Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method =~ in Ruby 3.2 #431

Closed
tilo opened this issue Jun 5, 2022 · 3 comments
Closed

undefined method =~ in Ruby 3.2 #431

tilo opened this issue Jun 5, 2022 · 3 comments

Comments

@tilo
Copy link

tilo commented Jun 5, 2022

This line:

opt.select { |o| o.is_a?(String) && o =~ /^-/ }.map(&:downcase).sort.reverse

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.
@tnir
Copy link
Contributor

tnir commented Jun 14, 2022

@tilo With the current Ruby 3.2.0dev ruby/ruby@56cc3e9, 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?

@hanneskaeufler
Copy link
Contributor

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.

@hsbt hsbt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2023
exoego added a commit to treasure-data/trino-client-ruby that referenced this issue Feb 21, 2023
gemmaro added a commit to gemmaro/specinfra that referenced this issue Dec 24, 2023
Reference: GitHub / ruby / rake / undefined method =~ in Ruby 3.2 mizzy#431 [1]

Error output:

  rake aborted!
  undefined method `=~' for #<Proc:0x00007f488b282050 /opt/hostedtoolcache/Ruby/3.2.2/x64/lib/ruby/gems/3.2.0/gems/rake-10.1.1/lib/rake/application.rb:357 (lambda)>

  (See full trace by running task with --trace)
  Error: Process completed with exit code 1.

[1] ruby/rake#431
gemmaro added a commit to gemmaro/specinfra that referenced this issue Dec 24, 2023
Reference: GitHub / ruby / rake / undefined method =~ in Ruby 3.2 mizzy#431 [1]

Error output:

  rake aborted!
  undefined method `=~' for #<Proc:0x00007f488b282050 /opt/hostedtoolcache/Ruby/3.2.2/x64/lib/ruby/gems/3.2.0/gems/rake-10.1.1/lib/rake/application.rb:357 (lambda)>

  (See full trace by running task with --trace)
  Error: Process completed with exit code 1.

[1] ruby/rake#431
@elliterate
Copy link

This was fixed by #297.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants