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-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 CBA311F4B4 for ; Fri, 9 Apr 2021 14:33:25 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id AA708120C1C; Fri, 9 Apr 2021 23:32:23 +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 01658120C1B for ; Fri, 9 Apr 2021 23:32:20 +0900 (JST) Received: by filterdrecv-c5749c756-z7g7k with SMTP id filterdrecv-c5749c756-z7g7k-15-607065AE-B4 2021-04-09 14:33:18.95202139 +0000 UTC m=+1286971.207046802 Received: from herokuapp.com (unknown) by ismtpd0134p1iad2.sendgrid.net (SG) with ESMTP id o8gKCyyASFS3IVPJ4mR8fw for ; Fri, 09 Apr 2021 14:33:18.833 +0000 (UTC) Date: Fri, 09 Apr 2021 14:33:18 +0000 (UTC) From: merch-redmine@jeremyevans.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 79394 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17789 X-Redmine-Issue-Author: soudai_s X-Redmine-Sender: jeremyevans0 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?RVE3t853K5scBhbmJHUzZTFFeVC=2FZSUmHZ0Dc+26wcEi2CTgsF1oz0wTSSxGGN?= =?us-ascii?Q?BIvMpOLgEDesRFlQFe5BB0fjHeufmtDc4sz9gzl?= =?us-ascii?Q?nfZVODWBeJjh5OW0SpFZFHG1XFaxN2gxs5iyJ2b?= =?us-ascii?Q?jrnK7Ht=2FyDF5m1TiNV5Rt76VVf4zDLg+JYo8nIN?= =?us-ascii?Q?jWVB+zMKa6BGsVPIu0n0u0CsAnS2DT8yiJWaV6R?= =?us-ascii?Q?96sif0tgT5lcQEg=2Fc=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 103348 Subject: [ruby-core:103348] [Ruby master Bug#17789] Incompatible behavior of Enumarator::Lazy#with_index X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17789 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed This is expected. The behavior has changed. All bug fixes are incompatibilities. ---------------------------------------- Bug #17789: Incompatible behavior of Enumarator::Lazy#with_index https://bugs.ruby-lang.org/issues/17789#change-91438 * Author: soudai_s (Soudai Sasada) * Status: Closed * Priority: Normal * ruby -v: ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin20] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- this method ignores the block passed to it, but this behavior looks different from the Enumerator (super class). ``` $ ruby -e '%w(a).lazy.with_index { |s, i| puts "#{s} => #{i}" }' a => 0 # Expected, but doesn't actually print anything ``` After confirmation I found #16414 but this behavior was not fixed and the doc in the modified source code states: "If a block given, iterates the given block for each element". Is this behavior intended? -- https://bugs.ruby-lang.org/