describe_homebrew_ruby: fix regex
`.` need to be escaped, otherwise it will match any character. Also improve code style for handling string s.
This commit is contained in:
parent
99e9a22b85
commit
b586a04204
@ -31,10 +31,11 @@ class SystemConfig
|
|||||||
def describe_homebrew_ruby
|
def describe_homebrew_ruby
|
||||||
s = describe_homebrew_ruby_version
|
s = describe_homebrew_ruby_version
|
||||||
|
|
||||||
if RUBY_PATH.to_s !~ %r{^/System/Library/Frameworks/Ruby.framework/Versions/[12]\.[089]/usr/bin/ruby}
|
if RUBY_PATH.to_s !~ %r{^/System/Library/Frameworks/Ruby\.framework/Versions/[12]\.[089]/usr/bin/ruby}
|
||||||
s = "#{s} => #{RUBY_PATH}"
|
"#{s} => #{RUBY_PATH}"
|
||||||
|
else
|
||||||
|
s
|
||||||
end
|
end
|
||||||
s
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def dump_verbose_config(f = $stdout)
|
def dump_verbose_config(f = $stdout)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user