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

[Fix #3120] Fix #new visibility modifier scopes #3126

Conversation

owst
Copy link
Contributor

@owst owst commented May 11, 2016

Blocks passed to {Class,Module,Struct}.new create a new scope, in a
similar way to Klass.class_eval. This was a regression introduced by my
PR #3060 where I forgot about these method calls.

Before submitting a PR make sure the following are checked:

  • Wrote good commit messages.
  • Used the same coding conventions as the rest of the project.
  • Feature branch is up-to-date with master (if not - rebase it)
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • All tests are passing.
  • The new code doesn't generate RuboCop offenses.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.

@owst owst force-pushed the fix_useless_method_definition_within_Class_Module_or_Struct_new branch 3 times, most recently from 5b92415 to 62d8a6e Compare May 11, 2016 00:45
@owst owst changed the title [Fix #3120] {Class,Module,Struct}.new opens a new visibility modifier… [Fix #3120] #new method visibility modifier scopes May 11, 2016
Blocks passed to {Class,Module,Struct}.new create a new scope, in a
similar way to Klass.class_eval.
@owst owst force-pushed the fix_useless_method_definition_within_Class_Module_or_Struct_new branch from 62d8a6e to 25deeed Compare May 11, 2016 00:48
@owst owst changed the title [Fix #3120] #new method visibility modifier scopes [Fix #3120] Fix #new visibility modifier scopes May 11, 2016
@bbatsov bbatsov merged commit a65e56e into rubocop:master May 11, 2016
@bbatsov
Copy link
Collaborator

bbatsov commented May 11, 2016

👍

Neodelf pushed a commit to Neodelf/rubocop that referenced this pull request Oct 15, 2016
Blocks passed to {Class,Module,Struct}.new create a new scope, in a
similar way to Klass.class_eval.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants