Issue #17494 has been updated by yahonda (Yasuo Honda).


Looks like this behavior has been triggered by https://github.com/ruby/ruby/commit/b9007b6c548f91e88fd3f2ffa23de740431fa969

* Created one file repro named `rep17494.rb` by adding `require "rspec/autorun"`

```
require "bundler/inline"

gemfile(true) do
  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"
end

require "rspec/autorun"
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

describe "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
```


* Execute rep17494.rb script against Ruby 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.rb
```

It works as expected `1 example, 0 failures`.

* Execute rep17494.rb script against Ruby as of b9007b6c548f91e88fd3f2ffa23de740431fa969

```
$ docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp rubylang/rubyfarm:b9007b6c548f91e88fd3f2ffa23de740431fa969 ruby rep17494.rb
```

It hangs. 

Of course, this reproduce case does not require Docker if you can build Ruby as of each commit.



----------------------------------------
Bug #17494: ruby is hanged when using activesupport + rspec + rspec-parameterized
https://bugs.ruby-lang.org/issues/17494#change-89680

* 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/