Skip to content
Snippets Groups Projects
Commit 8091b33f authored by Martin Afanasjew's avatar Martin Afanasjew Committed by Xu Cheng
Browse files

ruby 1.8: address syntax warnings in Homebrew core


Closes Homebrew/homebrew#45849.

Signed-off-by: default avatarXu Cheng <xucheng@me.com>
parent 4296ec63
No related branches found
No related tags found
No related merge requests found
......@@ -600,7 +600,7 @@ class FormulaAuditor
problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\""
end
if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec}/npm/bin]
if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec\}/npm/bin]
need_npm = "\#{Formula[\"node\"].opt_libexec\}/npm/bin"
problem <<-EOS.undent
Please add ENV.prepend_path \"PATH\", \"#{need_npm}"\ to def install
......
......@@ -33,7 +33,7 @@ class FormulaTests < Homebrew::TestCase
refute_predicate f, :any_version_installed?
prefix = HOMEBREW_CELLAR+f.name+"0.1"
prefix.mkpath
FileUtils.touch (prefix+Tab::FILENAME)
FileUtils.touch prefix+Tab::FILENAME
assert_predicate f, :any_version_installed?
ensure
f.rack.rmtree
......
......@@ -184,7 +184,7 @@ class MigratorTests < Homebrew::TestCase
assert_predicate @new_keg_record, :exist?
assert_predicate @old_keg_record.parent, :symlink?
refute_predicate (HOMEBREW_LIBRARY/"LinkedKegs/oldname"), :exist?
refute_predicate HOMEBREW_LIBRARY/"LinkedKegs/oldname", :exist?
assert_equal @new_keg_record.realpath, (HOMEBREW_LIBRARY/"LinkedKegs/newname").realpath
assert_equal @new_keg_record.realpath, @old_keg_record.realpath
assert_equal @new_keg_record.realpath, (HOMEBREW_PREFIX/"opt/oldname").realpath
......
......@@ -216,7 +216,7 @@ class PathnameInstallTests < Homebrew::TestCase
assert_predicate @dst+"bin", :directory?
assert_predicate @dst+"bin/a.txt", :exist?
assert_predicate @dst+"bin/b.txt", :exist?
assert_predicate (@dst+"bin").readlink, :relative?
assert_predicate((@dst+"bin").readlink, :relative?)
end
def test_install_relative_symlink
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment