Skip to content

Ruby 2.6: undefined method 'bind_call' #28

Description

@olleolleolle

In another project, I reported a failure "Ruby 2.6 fails in CI, undefined method 'bind_call'". ruby/timeout#116

The exception was:

/home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/test-unit-ruby-core-1.0.15/lib/core_assertions.rb:330:in block in separated_runner': undefined method bind_call' for #<UnboundMethod: Integer#to_s> (NoMethodError)

https://github.com/ruby/timeout/actions/runs/31351472087/job/93343044877?pr=115

CI output example from ruby/timeout repo

Your RubyGems version (3.0.3.1) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
===============================================================================
Failure: test_handling_enclosed_threadgroup(TestTimeout):
  assert_separately failed with error message
  pid 2304 exit 1
  | /home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/test-unit-ruby-core-1.0.15/lib/core_assertions.rb:330:in `block in separated_runner': undefined method `bind_call' for #<UnboundMethod: Integer#to_s> (NoMethodError)
  .
  <false> is not true.
/home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/test-unit-ruby-core-1.0.15/lib/core_assertions.rb:628:in `assert'
/home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/test-unit-ruby-core-1.0.15/lib/core_assertions.rb:409:in `assert_separately'
/home/runner/work/timeout/timeout/test/test_timeout.rb:396:in `test_handling_enclosed_threadgroup'
     393: 
     394:   # https://github.com/ruby/timeout/issues/24
     395:   def test_handling_enclosed_threadgroup
  => 396:     assert_separately(%w[-rtimeout], <<-'end;')
     397:       Thread.new {
     398:         t = Thread.current
     399:         group = ThreadGroup.new
===============================================================================
===============================================================================
Failure: test_threadgroup(TestTimeout):
  assert_separately failed with error message
  pid 2310 exit 1
  | /home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/test-unit-ruby-core-1.0.15/lib/core_assertions.rb:330:in `block in separated_runner': undefined method `bind_call' for #<UnboundMethod: Integer#to_s> (NoMethodError)
  .
  <false> is not true.
/home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/test-unit-ruby-core-1.0.15/lib/core_assertions.rb:628:in `assert'
/home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/test-unit-ruby-core-1.0.15/lib/core_assertions.rb:409:in `assert_separately'
/home/runner/work/timeout/timeout/test/test_timeout.rb:383:in `test_threadgroup'
     380:   end
     381: 
     382:   def test_threadgroup
  => 383:     assert_separately(%w[-rtimeout], <<-'end;')
     384:       tg = ThreadGroup.new
     385:       thr = Thread.new do
     386:         tg.add(Thread.current)
===============================================================================
Finished in 3.054786296 seconds.
31 tests, 67 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
rake aborted!
Command failed with status (1)
/home/runner/work/timeout/timeout/vendor/bundle/ruby/2.6.0/gems/rake-13.4.2/exe/rake:27:in `<top (required)>'
/opt/hostedtoolcache/Ruby/2.6.10/x64/bin/bundle:23:in `load'
/opt/hostedtoolcache/Ruby/2.6.10/x64/bin/bundle:23:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)
Error: Process completed with exit code 1.

```

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions