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=-2.5 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no 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 2A1DE1F4B4 for ; Tue, 26 Jan 2021 05:32:33 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id ED480120AE3; Tue, 26 Jan 2021 14:31:36 +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 8446C120AE1 for ; Tue, 26 Jan 2021 14:31:33 +0900 (JST) Received: by filterdrecv-p3las1-58ccd79dcc-vxnq9 with SMTP id filterdrecv-p3las1-58ccd79dcc-vxnq9-19-600FA965-1F 2021-01-26 05:32:21.240104911 +0000 UTC m=+34421.350664511 Received: from herokuapp.com (unknown) by ismtpd0139p1mdw1.sendgrid.net (SG) with ESMTP id Gw6SaSIuSMmST_cowfHKaw for ; Tue, 26 Jan 2021 05:32:21.109 +0000 (UTC) Date: Tue, 26 Jan 2021 05:32:21 +0000 (UTC) From: yasuo.honda@gmail.com Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 78159 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17494 X-Redmine-Issue-Author: sue445 X-Redmine-Sender: yahonda 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?DxUY8rT3gN23S6zXgBXsyZrbdOxEboSr6aRiQceB1g18HBkZDZJliOY0tsL7zv?= =?us-ascii?Q?FOV2qaRSAeF=2F=2F58G2jFdHH3vEZcSsM1T2Yh9WH6?= =?us-ascii?Q?UDagikcTVXqi76sEbsiqIsKfvge=2FzqBJvgVglPJ?= =?us-ascii?Q?2l4bfpe0UjCYq6x1enQFRmQsFCV2GNj6X28P5QJ?= =?us-ascii?Q?pqty8ia1dcFSCKhr4YuUIi+TTIKnX2N8hb6AnAV?= =?us-ascii?Q?rmINm6XWrRyQFc9NA=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 50999 Subject: [ruby-dev:50999] [Ruby master Bug#17494] ruby is hanged when using activesupport + rspec + rspec-parameterized 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 #17494 has been updated by yahonda (Yasuo Honda). This minimum case hangs since https://github.com/ruby/ruby/commit/b9007b6c548f91e88fd3f2ffa23de740431fa969 * Save this minimum case as `rep17494_min.rb`, added some p method to see if it hangs or not. ```ruby Object.prepend(Module.new) using(Module.new { refine Object do def hello; end end }) Object.new.hello module M def hello; end end class A include M end p 'Showing Object.instance_methods' p Object.instance_methods ``` * Run this rep17494_min.rb against as of b9007b6c548f91e88fd3f2ffa23de740431fa969 using `rubylang/rubyfarm:b9007b6c548f91e88fd3f2ffa23de740431fa969` docker image ``` % docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp rubylang/rubyfarm:b9007b6c548f91e88fd3f2ffa23de740431fa969 ruby rep17494_min.rb "Showing Object.instance_methods" ``` It hangs at `p Object.instance_methods`. * Run this rep17494_min.rb against as of f2286925f08406bc857f7b03ad6779a5d61443ae, which is the parent commit of b9007b6c548f91e88fd3f2ffa23de740431fa969 ``` % docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp rubylang/rubyfarm:f2286925f08406bc857f7b03ad6779a5d61443ae ruby rep17494_min.rb "Showing Object.instance_methods" [:dup, :itself, :yield_self, :then, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :frozen?, :methods, :singleton_methods, :protected_methods, :private_methods, :public_methods, :instance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :remove_instance_variable, :instance_of?, :kind_of?, :is_a?, :tap, :singleton_class, :clone, :public_send, :method, :public_method, :singleton_method, :define_singleton_method, :extend, :<=>, :to_enum, :enum_for, :===, :=~, :!~, :nil?, :eql?, :respond_to?, :freeze, :inspect, :object_id, :send, :to_s, :display, :class, :hash, :__send__, :!, :__id__, :==, :!=, :equal?, :instance_eval, :instance_exec] ``` It shows the result of `p Object.instance_methods`. These steps do not require Docker if each Ruby build is available locally. ---------------------------------------- Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized https://bugs.ruby-lang.org/issues/17494#change-90099 * Author: sue445 (Go Sueyoshi) * Status: Open * Priority: Normal * ruby -v: ruby 3.0.0p0 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- # Example code ## Gemfile ```ruby # frozen_string_literal: true source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } gem "activesupport", "6.1.0" gem "rspec", "3.10.0" gem "rspec-parameterized", "0.4.2" ``` ## spec file ``` ruby require "active_support/all" require "rspec-parameterized" describe "CLI" do subject do # Expected error, but actual hunged here cli.foo # <- hunged here end it { expect { subject }.to raise_error } end xdescribe "GitlabMrRelease::Project" do describe "#api_version" do using RSpec::Parameterized::TableSyntax where(:api_endpoint, :expected) do "http://example.com/api/v4/" | 4 end with_them do # it { should eq expected } end end end ``` all codes are here. https://github.com/sue445/ruby_3_0_0_bug_report_20201231 # Expected spec is successful (This is the behavior up to ruby 2.7.2) # Actual hunged at line 7 -- https://bugs.ruby-lang.org/