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

compat: correct MacOS.prefer_64_bit? deprecation #5519

Merged
merged 1 commit into from Jan 10, 2019

Conversation

Projects
None yet
2 participants
@jonchang
Copy link
Member

jonchang commented Jan 9, 2019

  • 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 style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Reported via the Discourse forum. It seems like #5477 had a small bug where MacOS.prefer_64_bit? was prematurely disabled by being inaccessible.

Steps to reproduce:

echo 'MacOS.prefer_64_bit?' | brew irb

Incorrect behavior:

$ echo 'MacOS.prefer_64_bit?' | brew irb
==> Interactive Homebrew Shell
Example commands available with: brew irb --examples
Switch to inspect mode.
MacOS.prefer_64_bit?
NoMethodError: undefined method `prefer_64_bit?' for OS::Mac:Module
	from (irb):1
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:88:in `<main>'

Correct behavior:

$ echo 'MacOS.prefer_64_bit?' | brew irb
==> Interactive Homebrew Shell
Example commands available with: brew irb --examples
Switch to inspect mode.
MacOS.prefer_64_bit?
MethodDeprecatedError: Calling MacOS.prefer_64_bit? is deprecated! There is no replacement.
	from /usr/local/Homebrew/Library/Homebrew/compat/os/mac.rb:6:in `prefer_64_bit?'
	from (irb):1
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:88:in `<main>'

@jonchang jonchang self-assigned this Jan 9, 2019

@jonchang jonchang requested a review from MikeMcQuaid Jan 9, 2019

@jonchang

This comment has been minimized.

Copy link
Member

jonchang commented Jan 10, 2019

Going to merge this since this is an active bug and tests have passed.

@jonchang jonchang merged commit 241ee98 into Homebrew:master Jan 10, 2019

1 check passed

coverage/coveralls First build on fix-prefer-64-bit at 71.468%
Details

@jonchang jonchang deleted the jonchang:fix-prefer-64-bit branch Jan 10, 2019

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jan 10, 2019

Thanks for the fix @jonchang!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment