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

Simplify Keg class #1878

Merged
merged 2 commits into from
Jan 19, 2017
Merged

Simplify Keg class #1878

merged 2 commits into from
Jan 19, 2017

Conversation

alyssais
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?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew tests with your changes locally?

The Keg class is pretty complex. It's scattered with repetitive method definitions that just forward to path. These are a couple of straightforward changes to make it a bit less difficult to navigate and, well… long.

As far as I can tell, the conditional aliasing of to_path is a remnant of Ruby 1.8.

I had a one-off test failure here as part of this test, but it seems unlikely to be related and I haven't been able to reproduce since…

@alyssais
Copy link
Contributor Author

Huh, got the failure on Travis too.

Copy link
Member

@reitermarkus reitermarkus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactoring. 👍

alyssais added a commit to alyssais/brew that referenced this pull request Jan 19, 2017
This was responsible for the sporadic failures I encountered in Homebrew#1878.
@alyssais alyssais merged commit d7c463a into Homebrew:master Jan 19, 2017
@alyssais alyssais deleted the keg_cleanup branch January 19, 2017 19:24
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants