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

[Library/Homebrew/cli/named_args.rb] to_formulae_to_casks(): Reasssociate its rescue Block with the Correct Enclosing Scope #9431

Conversation

RandomDSdevel
Copy link
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? (Yes, see my commit message.)
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally? (No unexpected failures or new failures related to my changes other than some test execution timeouts due to running on older hardware.)
  • Have you successfully run brew man locally and committed any changes?

     I noticed a small issue with PR #9398; this PR fixes it.

CC @reitermarkus. (Let me know if you actually meant to make the change I revert here.)

…ciate its

`rescue` block with the right enclosing scope.

     PR Homebrew#9398 accidentally removed some semantically significant indentation in
this function, thus inadvertently kicking the `rescue` block inside out to func-
tion scope, when it moved its code further up in the file.  This may well not
confuse a Ruby interpreter, but it could trip human readers up.  Compensate and
correct the overlooked offending oversight and potential refactoring mistake by
restoring only that indentation, leaving the function in its new location.

Refs Homebrew#9398.
@reitermarkus reitermarkus merged commit 596b4f6 into Homebrew:master Dec 6, 2020
@reitermarkus
Copy link
Member

Thanks! Apparently RuboCop doesn't catch this.

@RandomDSdevel
Copy link
Contributor Author

     No problem!

@RandomDSdevel RandomDSdevel deleted the restore-semantically-significant-indentation-lost-accidentally-in-PR-9398 branch December 6, 2020 01:09
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 6, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants