1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Suppress stty error on Apple Terminal

`stty` called in `Reline::ANSI.deprep` command shows the following
error message on macOS Apple Terminal, with some settings.

```
$ LANG=C irb
irb(main):001:0>
stty: 'standard input': unable to perform all requested operations
stty: 'standard input': unable to perform all requested operations
```
This commit is contained in:
Nobuyoshi Nakada 2019-11-13 15:28:12 +09:00 committed by aycabta
parent 473e314791
commit cef9ebfbd3

View file

@ -135,7 +135,7 @@ class Reline::ANSI
def self.deprep(otio)
int_handle = Signal.trap('INT', 'IGNORE')
`stty #{otio}`
system("stty #{otio}", err: File::NULL)
Signal.trap('INT', int_handle)
Signal.trap('WINCH', @@old_winch_handler) if @@old_winch_handler
end