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,11 +31,12 @@ class SystemConfig
|
||||
def describe_homebrew_ruby
|
||||
s = describe_homebrew_ruby_version
|
||||
|
||||
if RUBY_PATH.to_s !~ %r{^/System/Library/Frameworks/Ruby.framework/Versions/[12]\.[089]/usr/bin/ruby}
|
||||
s = "#{s} => #{RUBY_PATH}"
|
||||
end
|
||||
if RUBY_PATH.to_s !~ %r{^/System/Library/Frameworks/Ruby\.framework/Versions/[12]\.[089]/usr/bin/ruby}
|
||||
"#{s} => #{RUBY_PATH}"
|
||||
else
|
||||
s
|
||||
end
|
||||
end
|
||||
|
||||
def dump_verbose_config(f = $stdout)
|
||||
dump_generic_verbose_config(f)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user