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
[#9760] Allow passing range as a positional argument to RangeHelp#range_with_surrounding_space #10748
Conversation
…pace For consistency with other methods
As introduced in rubocop/rubocop#10748
Looks good to me. Thanks! |
def range_with_surrounding_space(range:, side: :both, | ||
newlines: true, whitespace: false, | ||
continuations: false) | ||
NOT_GIVEN = Module.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious – why is NOT_GIVEN
a module and not e.g. a symbol?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module.new == Module.new
evaluates to false
. Chances of someone passing a :not_given
positional argument are nearing zero, but anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks.
As introduced in rubocop/rubocop#10748
As introduced in rubocop/rubocop#10748
As introduced in rubocop/rubocop#10748
As introduced in rubocop/rubocop#10748
Related to #9760
Prequel to #10729 and #10727
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.