Merge pull request #2738 from constXife/master
undefined local variable or method `ruby_version' on macOS 10.13 beta
This commit is contained in:
commit
d9abe6552d
@ -195,7 +195,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_ruby_version
|
def check_ruby_version
|
||||||
return if RUBY_VERSION[/\d\.\d/] == "2.0"
|
ruby_version = "2.0"
|
||||||
|
return if RUBY_VERSION[/\d\.\d/] == ruby_version
|
||||||
|
|
||||||
<<-EOS.undent
|
<<-EOS.undent
|
||||||
Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew
|
Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew
|
||||||
|
|||||||
@ -45,4 +45,17 @@ describe Homebrew::Diagnostic::Checks do
|
|||||||
expect(subject.check_homebrew_prefix)
|
expect(subject.check_homebrew_prefix)
|
||||||
.to match("Your Homebrew's prefix is not /usr/local.")
|
.to match("Your Homebrew's prefix is not /usr/local.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
specify "#check_ruby_version" do
|
||||||
|
allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.13"))
|
||||||
|
stub_const("RUBY_VERSION", "2.3.3p222")
|
||||||
|
|
||||||
|
expect(subject.check_ruby_version)
|
||||||
|
.to match <<-EOS.undent
|
||||||
|
Ruby version 2.3.3p222 is unsupported on 10.13. Homebrew
|
||||||
|
is developed and tested on Ruby 2.0, and may not work correctly
|
||||||
|
on other Rubies. Patches are accepted as long as they don't cause breakage
|
||||||
|
on supported Rubies.
|
||||||
|
EOS
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user