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

An error occurred while Style/ArgumentsForwarding cop was inspecting #12832

Closed
tim-semba opened this issue Apr 11, 2024 · 0 comments · Fixed by #12833
Closed

An error occurred while Style/ArgumentsForwarding cop was inspecting #12832

tim-semba opened this issue Apr 11, 2024 · 0 comments · Fixed by #12833
Labels

Comments

@tim-semba
Copy link

Expected behavior

No errors occur.

Actual behavior

1 error occurred:
An error occurred while Style/ArgumentsForwarding cop was inspecting foobar.rb:6:4.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop/rubocop/issues

Mention the following information in the issue report:
1.62.1 (using Parser 3.3.0.5, rubocop-ast 1.31.2, running on ruby 3.3.0) [x86_64-linux]

Steps to reproduce the problem

  1. Put foobar.rb
# frozen_string_literal: true

# Foobar class
class Foobar
  class << self
    def foobar(foo)
      class << foo
        def bar(baz, &)
          baz.some_method(&)
        end
      end
    end
  end
end
  1. Put .rubocop.yml
AllCops:
  TargetRubyVersion: 3.3
  NewCops: enable
  1. Run
$ bundle exec rubocop -c .rubocop.yml foobar.rb

RuboCop version

$ bundle exec rubocop -V
1.62.1 (using Parser 3.3.0.5, rubocop-ast 1.31.2, running on ruby 3.3.0) [x86_64-linux]
  - rubocop-performance 1.21.0
  - rubocop-rails 2.24.1
  - rubocop-rspec 2.29.1
@koic koic added the bug label Apr 11, 2024
koic added a commit to koic/rubocop that referenced this issue Apr 11, 2024
Fixes rubocop#12832.

This PR fixes an error for `Style/ArgumentsForwarding`
when using block arg in nested method definitions.
bbatsov pushed a commit that referenced this issue Apr 11, 2024
Fixes #12832.

This PR fixes an error for `Style/ArgumentsForwarding`
when using block arg in nested method definitions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants