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.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 8B8631F46C for ; Sun, 12 Jan 2020 18:20:02 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id DD77B120B18; Mon, 13 Jan 2020 03:19:48 +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 51F28120B08 for ; Mon, 13 Jan 2020 03:19:46 +0900 (JST) Received: by filterdrecv-p3iad2-57f487d66-78j5x with SMTP id filterdrecv-p3iad2-57f487d66-78j5x-18-5E1B6346-E 2020-01-12 18:19:50.394682255 +0000 UTC m=+2309587.615325978 Received: from herokuapp.com (unknown [3.88.104.96]) by ismtpd0045p1mdw1.sendgrid.net (SG) with ESMTP id ECyRX-Q8TCGNp202q5rcTQ for ; Sun, 12 Jan 2020 18:19:50.253 +0000 (UTC) Date: Sun, 12 Jan 2020 18:19:50 +0000 (UTC) From: ko1@atdot.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72473 X-Redmine-Project: ruby-master X-Redmine-Issue-Id: 16503 X-Redmine-Issue-Author: jnchito X-Redmine-Sender: ko1 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?fVTMYOBjtdvXNcWwrscBhLsHItUXVK5L4mtnq0mdcRek1sNk4=2FF5Q4uICbGJBq?= =?us-ascii?Q?3eSJTyMo+nvaLUaRITUPMYkQ8Usw3zXRjHuKMvq?= =?us-ascii?Q?A=2FjwA2guwDG9fVR6J5y4BPBPKbNVzHPY1ci7f=2FM?= =?us-ascii?Q?lLQlfTIsc4GbeUYTn=2FxO+TnNyuP2lLsUvplwHsj?= =?us-ascii?Q?h=2F3cPvzNNaW6tuDVANiwiQGJL0Z5dteowcg=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96810 Subject: [ruby-core:96810] [Ruby master Bug#16503] "ret: 2, hash modified during iteration" error in Ruby 2.7.0 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 #16503 has been updated by ko1 (Koichi Sasada). Could you make reproducible script? ---------------------------------------- Bug #16503: "ret: 2, hash modified during iteration" error in Ruby 2.7.0 https://bugs.ruby-lang.org/issues/16503#change-83804 * Author: jnchito (Junichi Ito) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux] (heroku-18 stack) * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- I am running a Rails app on Heroku. After upgrading to Ruby 2.7, I sometimes get `ret: 2, hash modified during iteration` error. The same issue is reported here (I'm using meta-tags gem too): https://github.com/kpumuk/meta-tags/issues/209 This gem deletes elements while iterating hash (HashWithIndifferentAccess actually), so I guess it might involve this error: https://github.com/kpumuk/meta-tags/blob/v2.13.0/lib/meta_tags/renderer.rb#L168 https://github.com/kpumuk/meta-tags/blob/v2.13.0/lib/meta_tags/renderer.rb#L181 https://github.com/kpumuk/meta-tags/blob/v2.13.0/lib/meta_tags/meta_tags_collection.rb#L85 However, this error does not occur every time (sometimes works, sometimes fails), and it didn't occur in Ruby 2.6. So I'm wondering why. Do you have any idea on this? -- https://bugs.ruby-lang.org/