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

compat: correct MacOS.prefer_64_bit? deprecation #5519

Merged
merged 1 commit into from
Jan 10, 2019
Merged

compat: correct MacOS.prefer_64_bit? deprecation #5519

merged 1 commit into from
Jan 10, 2019

Conversation

jonchang
Copy link
Contributor

@jonchang 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 January 9, 2019 23:25
@jonchang
Copy link
Contributor Author

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
@jonchang jonchang deleted the fix-prefer-64-bit branch January 10, 2019 00:01
@MikeMcQuaid
Copy link
Member

Thanks for the fix @jonchang!

@lock lock bot added the outdated PR was locked due to age label Feb 9, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 9, 2019
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.

2 participants