I am on Windows XP.
When I type:
require "ansi"
ANSI::Terminal.terminal_width
I have the message: No such file or directory - stty size
In https://github.com/rubyworks/ansi/blob/master/lib/ansi/terminal.rb, the code seems to require successively ansi/terminal/stty, ansi/terminal/curses, ansi/terminal/termios and ansi/terminal/win32 until one of these require does not raises.
I guess that stty is supposed to raise on Windows, to avoid using this library. However when I require manually ansi/terminal/stty, it does not raises.
In fact, when I read the code of ansi/terminal/stty I do not see anything that can raise on Windows (or on any platform).
I am on Windows XP.
When I type:
I have the message:
No such file or directory - stty sizeIn https://github.com/rubyworks/ansi/blob/master/lib/ansi/terminal.rb, the code seems to require successively
ansi/terminal/stty,ansi/terminal/curses,ansi/terminal/termiosandansi/terminal/win32until one of these require does not raises.I guess that
sttyis supposed to raise on Windows, to avoid using this library. However when I require manuallyansi/terminal/stty, it does not raises.In fact, when I read the code of
ansi/terminal/sttyI do not see anything that can raise on Windows (or on any platform).