ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:50941] [Ruby master Bug#17094] PTY methods with blocks
@ 2020-07-31  5:44 matsumoto
  2020-07-31  7:39 ` [ruby-dev:50942] " nobu
  2020-08-01 10:31 ` [ruby-dev:50943] " matsumoto
  0 siblings, 2 replies; 3+ messages in thread
From: matsumoto @ 2020-07-31  5:44 UTC (permalink / raw)
  To: ruby-dev

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-dev:50942] [Ruby master Bug#17094] PTY methods with blocks
  2020-07-31  5:44 [ruby-dev:50941] [Ruby master Bug#17094] PTY methods with blocks matsumoto
@ 2020-07-31  7:39 ` nobu
  2020-08-01 10:31 ` [ruby-dev:50943] " matsumoto
  1 sibling, 0 replies; 3+ messages in thread
From: nobu @ 2020-07-31  7:39 UTC (permalink / raw)
  To: ruby-dev

Issue #17094 has been updated by nobu (Nobuyoshi Nakada).


As it can be incompatible only when passing a lambda, I don't think it is a serious problem.

----------------------------------------
Bug #17094: PTY methods with blocks
https://bugs.ruby-lang.org/issues/17094#change-86862

* 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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-dev:50943] [Ruby master Bug#17094] PTY methods with blocks
  2020-07-31  5:44 [ruby-dev:50941] [Ruby master Bug#17094] PTY methods with blocks matsumoto
  2020-07-31  7:39 ` [ruby-dev:50942] " nobu
@ 2020-08-01 10:31 ` matsumoto
  1 sibling, 0 replies; 3+ messages in thread
From: matsumoto @ 2020-08-01 10:31 UTC (permalink / raw)
  To: ruby-dev

Issue #17094 has been updated by soutaro (Soutaro Matsumoto).


Runtime testing of RBS uncovered this issue.

https://github.com/ruby/rbs/pull/346#issuecomment-665817340

Maybe we can fix the RBS runtime checking then.

----------------------------------------
Bug #17094: PTY methods with blocks
https://bugs.ruby-lang.org/issues/17094#change-86884

* 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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-01 10:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31  5:44 [ruby-dev:50941] [Ruby master Bug#17094] PTY methods with blocks matsumoto
2020-07-31  7:39 ` [ruby-dev:50942] " nobu
2020-08-01 10:31 ` [ruby-dev:50943] " matsumoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).