1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/io
Nobuyoshi Nakada a79966743c [ruby/io-console] Fix timeout type error (#18)
Fixed TypeError when IO#getch timed out

`rb_io_wait` returns a bit-flags Integer representing available
events, or Qfalse if timed out.  Also the result of `NUM2INT` is
not a `VALUE`.

```
$ ./bin/ruby -v -rio/console -e "p IO.console.getch(intr: true, time: 0.1)"
ruby 3.0.0dev (2020-10-09T20:27:30Z master 5ea2ea74cc) [x64-mingw32]
-e:1:in `getch': no implicit conversion of false into Integer (TypeError)
        from -e:1:in `<main>'
```

https://github.com/ruby/io-console/commit/3bdfaf62df
2020-10-11 02:00:24 +09:00
..
console [ruby/io-console] Fix timeout type error (#18) 2020-10-11 02:00:24 +09:00
nonblock io + socket: make pipes and sockets nonblocking by default 2018-11-22 08:46:51 +00:00
wait Add explicitly require for Dir.mktmpdir 2020-07-30 21:01:22 +09:00