ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: matsumoto@soutaro.com
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50941] [Ruby master Bug#17094] PTY methods with blocks
Date: Fri, 31 Jul 2020 05:44:08 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-17094.20200731054408.370@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-17094.20200731054408.370@ruby-lang.org>

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/

       reply	other threads:[~2020-07-31  5:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  5:44 matsumoto [this message]
2020-07-31  7:39 ` [ruby-dev:50942] " nobu
2020-08-01 10:31 ` [ruby-dev:50943] " matsumoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-17094.20200731054408.370@ruby-lang.org \
    --to=matsumoto@soutaro.com \
    --cc=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).