-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
self.method_missing on require respond_to_missing as instance method instead of class method #3358
Comments
Insti
added a commit
to Insti/rubycritic
that referenced
this issue
Aug 4, 2016
Add self.respond_to_missing? method to Config module. But... Due to this rubocop issue: rubocop/rubocop#3358 an offense is still detected.
Drenmi
added a commit
to Drenmi/rubocop
that referenced
this issue
Aug 5, 2016
This cop would check for an instance method named `#respond_to_missing?` even if `#method_missing` was implemented as a class method. This fixes that by ensuring that the cop looks in the same scope.
soutaro
added a commit
to soutaro/rubocop
that referenced
this issue
Aug 7, 2016
If last `rescue` is without parameter, location calculation of offense raises an `NoMethodError`. This fixes that by using location of `rescue` keyword in that case.
bbatsov
pushed a commit
that referenced
this issue
Aug 7, 2016
Pushing to rubygems anytime soon? |
Neodelf
pushed a commit
to Neodelf/rubocop
that referenced
this issue
Oct 15, 2016
rubocop#3368) This cop would check for an instance method named `#respond_to_missing?` even if `#method_missing` was implemented as a class method. This fixes that by ensuring that the cop looks in the same scope.
Neodelf
pushed a commit
to Neodelf/rubocop
that referenced
this issue
Oct 15, 2016
If last `rescue` is without parameter, location calculation of offense raises an `NoMethodError`. This fixes that by using location of `rescue` keyword in that case.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
For some reasons, I defined the
method_missing
as a class method.The corresponding cop rejects my code because
respond_to_missing?
is missing.I assume this method should be a class method too but this doesn't work. The cop accepts only if I declare an instance method.
Here is an example:
Version used: 0.42.0
The text was updated successfully, but these errors were encountered: