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

9 commits

Author SHA1 Message Date
Arlandis Word
59e7afd40b Fix rubocop empty line after guard clause style violations 2018-10-14 09:44:58 -04:00
strcmp
10c8d19d1f fix #1464 2015-08-22 15:14:26 +01:00
Kyrylo Silin
2a053519aa terminal: rescue Errno::EOPNOTSUPP
Fixes #1352 (crash when $stdout is a socket)

Spin defines its own `#tty?` method on `$stdout`, which breaks Pry.

9112a702a1/lib/spin.rb (L342)
2015-02-26 15:33:45 +02:00
Conrad Irwin
b252d3aeff Don't return cols = 0 [Fixes #1267]
It just causes zero division errors.
2014-08-16 16:10:10 -07:00
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