Test failure with `make test-bundled-gems`

Open
#2,062 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
testing

Research direction

Start by running make test-bundled-gems and inspect test/stdlib/Regexp_test.rb at the failing test_compile, test_linear_time? and test_new cases. Trace the reported calls through gems/src/rbs/lib/rbs/unit_test/spy.rb and the related type assertion helpers. Done means the reported Regexp tests no longer raise the missing inspect error.

Written by the indexing model from the issue text.

Description

I randomly got the following test failures in recent days. I'm not sure why caused these failures with Ruby core and rbs changes.

Error: test_compile(RegexpSingletonTest): NoMethodError: undefined method 'inspect' for an instance of RBS::UnitTest::Convertibles::ToInt
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp#initialize'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp.compile'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'block (2 levels) in wrapped_object'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/Regexp_test.rb:51:in 'block (2 levels) in RegexpSingletonTest#test_compile'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:49:in 'RBS::UnitTest::WithAliases#with_int'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'Enumerator#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'RBS::UnitTest::WithAliases::WithEnum#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:30:in 'RBS::UnitTest::WithAliases::WithEnum#and'
test/stdlib/Regexp_test.rb:50:in 'block in RegexpSingletonTest#test_compile'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:60:in 'RBS::UnitTest::WithAliases#with_string'
test/stdlib/Regexp_test.rb:46:in 'RegexpSingletonTest#test_compile'
Error: test_linear_time?(RegexpSingletonTest): NoMethodError: undefined method 'inspect' for an instance of RBS::UnitTest::Convertibles::ToInt
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp.linear_time?'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'block (2 levels) in wrapped_object'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/Regexp_test.rb:122:in 'block (2 levels) in RegexpSingletonTest#test_linear_time?'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:49:in 'RBS::UnitTest::WithAliases#with_int'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'Enumerator#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'RBS::UnitTest::WithAliases::WithEnum#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:30:in 'RBS::UnitTest::WithAliases::WithEnum#and'
test/stdlib/Regexp_test.rb:121:in 'block in RegexpSingletonTest#test_linear_time?'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:60:in 'RBS::UnitTest::WithAliases#with_string'
test/stdlib/Regexp_test.rb:112:in 'RegexpSingletonTest#test_linear_time?'
Error: test_new(RegexpSingletonTest): NoMethodError: undefined method 'inspect' for an instance of RBS::UnitTest::Convertibles::ToInt
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp#initialize'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Class#new'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'block (2 levels) in wrapped_object'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/Regexp_test.rb:233:in 'block (2 levels) in RegexpSingletonTest#test_new'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:49:in 'RBS::UnitTest::WithAliases#with_int'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'Enumerator#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'RBS::UnitTest::WithAliases::WithEnum#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:30:in 'RBS::UnitTest::WithAliases::WithEnum#and'
test/stdlib/Regexp_test.rb:232:in 'block in RegexpSingletonTest#test_new'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:60:in 'RBS::UnitTest::WithAliases#with_string'
test/stdlib/Regexp_test.rb:228:in 'RegexpSingletonTest#test_new'
Dominant language
Ruby
Stars
2.2k
Forks
263
Avg merge
1d 20h
Merged PRs (30d)
64

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby/rbs

All issues in ruby/rbs

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.