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

TrivialAccessors gives wrong correction with instance_eval #2066

Closed
tranvictor opened this issue Jul 25, 2015 · 0 comments
Closed

TrivialAccessors gives wrong correction with instance_eval #2066

tranvictor opened this issue Jul 25, 2015 · 0 comments
Labels

Comments

@tranvictor
Copy link

Consider this snippet of code:

obj.instance_eval do
  def foo
    @foo
  end
end

This code shouldn't be autocorrected with attr_reader because the method definition is in instance context. attr_reader doesn't exist in this context.

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

No branches or pull requests

2 participants