[ruby-dev:50941] [Ruby master Bug#17094] PTY methods with blocks
From:
matsumoto@...
Date:
2020-07-31 05:44:08 UTC
List:
ruby-dev #50941
Issue #17094 has been reported by soutaro (Soutaro Matsumoto).
----------------------------------------
Bug #17094: PTY methods with blocks
https://bugs.ruby-lang.org/issues/17094
* Author: soutaro (Soutaro Matsumoto)
* Status: Open
* Priority: Normal
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Some methods on PTY yields one array if a block is given, but the RDoc says it passes two arguments to the block.
https://github.com/ruby/ruby/blob/master/ext/pty/pty.c#L529
``` c
return rb_ensure(rb_yield, assoc, pty_close_pty, assoc);
```
https://github.com/ruby/ruby/blob/master/ext/pty/pty.c#L467
```
* PTY.open {|master_io, slave_file| ... } => block value
```
I'd like to propose to fix the implementation. However, it would make more sense to fix the docs because of potential incompatibilities.
--
https://bugs.ruby-lang.org/