From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 6C6E21F5AE for ; Fri, 31 Jul 2020 07:39:26 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 192151208B4; Fri, 31 Jul 2020 16:38:55 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 12DC2120B58 for ; Fri, 31 Jul 2020 16:38:52 +0900 (JST) Received: by filterdrecv-p3iad2-d8cc6d457-4rql4 with SMTP id filterdrecv-p3iad2-d8cc6d457-4rql4-20-5F23CAA3-3C 2020-07-31 07:39:15.709638922 +0000 UTC m=+135060.654357192 Received: from herokuapp.com (unknown) by ismtpd0050p1iad1.sendgrid.net (SG) with ESMTP id Al4gmUXUTLmMNgKmhDM7NQ for ; Fri, 31 Jul 2020 07:39:15.571 +0000 (UTC) Date: Fri, 31 Jul 2020 07:39:15 +0000 (UTC) From: nobu@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 75242 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17094 X-Redmine-Issue-Author: soutaro X-Redmine-Sender: nobu X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?q8Dly+pU2+3ektTtZVXgZtbJPXwqo7p86jCsvYTW4BwWsvQViriZq0fyYjgK3q?= =?us-ascii?Q?IlvXEvokbQFryRNvaEt5nma+MKdFqERHWt7PP8v?= =?us-ascii?Q?3XAjivE8VDiJm0YQ6pT0vDQO+j7wsM2pnzdMaAO?= =?us-ascii?Q?65NJ7M=2FzhTL7TnyiVqmShYt97VOTwG853c9BnWE?= =?us-ascii?Q?bILudGI2q+cYjijCngB3kowvPK0GGj35SG04T7N?= =?us-ascii?Q?NIJ0MKQz+M2J7s+sk=3D?= To: ruby-dev@ruby-lang.org X-ML-Name: ruby-dev X-Mail-Count: 50942 Subject: [ruby-dev:50942] [Ruby master Bug#17094] PTY methods with blocks X-BeenThere: ruby-dev@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: "Ruby developers \(Japanese\)" List-Id: "Ruby developers \(Japanese\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-dev-bounces@ruby-lang.org Sender: "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/