1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Ryan Fitzgerald
bfe70aa165 Check if Readline is defined before getting screen size 2014-02-02 17:08:44 -08:00
Ryan Fitzgerald
3bbe0f0c32 Remove support for 1.8-compatible versions of Ruby 2014-01-19 17:43:07 -08:00
☈king
9d20a96613 Add Pry::Terminal.height! (only used once) 2013-02-07 21:30:20 -06:00
Kyrylo Silin
d331ded410 Terminal: don't let Readline return [0, 0]
Some of the tests from "spec/commands/ls_spec.rb" were failing on
Rubinius and 1.9.2. The problems was introduced by this commit:

  (Tweak and Refactor Pry::Terminal)
  fc522f837a

The problem is that `Readline.get_screen_size` can return `[0, 0]`.
That's not good, because it breaks a couple of our tests (table output
stuff). But now...

          .o( ...it is fixed. Twit-twoo! )
    \{0,0}/
2013-02-04 17:29:09 +02:00
☈king
fc522f837a Tweak and Refactor Pry::Terminal
The biggest behavior change is to favor `io/console` (but still not when
on jruby). The previous favorite was `Readline.get_screen_size`, but
that thing is stale just like the env. The only reason it gets updated
is if you put `Pry.auto_resize!` in your `~/.pryrc`

The next change is more error handling in `Pry.auto_resize!`

Otherwise I renamed `TerminalInfo` to `Terminal`, which is something
andrewvos and I discussed way back when `TerminalInfo` first came about.

The rest was a little Extract Method stuff, no biggie.
2013-01-30 21:48:12 -06:00