rake
rake copied to clipboard
undefined method `=~` in Ruby 3.2
This line: https://github.com/ruby/rake/blob/86d7ad9b7bdc621945ba1c3fcba071167fc7301d/lib/rake/application.rb#L395
is causing this error when running against Ruby 3.2 or head
Run bundle exec rake test
rake aborted!
NoMethodError: undefined method `=~' for #<Proc:0x00007f91a0e28540 /home/runner/work/smarter_csv/smarter_csv/vendor/bundle/ruby/3.2.0+1/gems/rake-10.5.0/lib/rake/application.rb:393 (lambda)>
/opt/hostedtoolcache/Ruby/3.2.0-preview1/x64/bin/bundle:25:in `load'
/opt/hostedtoolcache/Ruby/3.2.0-preview1/x64/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)
Error: Process completed with exit code 1.
@tilo With the current Ruby 3.2.0dev https://github.com/ruby/ruby/commit/56cc3e99b6b9ec004255280337f6b8353f5e5b06, it looks like no error according to the latest build.
https://github.com/ruby/rake/runs/6872931931?check_suite_focus=true
/home/runner/.rubies/ruby-head/bin/ruby --version
ruby 3.2.0dev (2022-06-13T17:11:27Z master 56cc3e99b6) [x86_64-linux]
Can you try the latest Ruby 3.2 head to reproduce?
I was running into the same error and tried to reproduce it. In the end I just saw the error with rake 11, but was unable to repro with the current rake. I assume you'll be able to fix the problem by bumping rake to the most current version which appears to support ruby 3.2 just fine.