Stop joining symbols to pathnames

Ruby 2.2's native Pathname#/ accepts only string-like objects.
This commit is contained in:
Jack Nagel 2014-06-09 14:54:49 -05:00
parent 974b7e71ef
commit e3f082c294
4 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@ class Build
ENV.activate_extensions!
deps.map(&:to_formula).each do |dep|
opt = HOMEBREW_PREFIX/:opt/dep
opt = HOMEBREW_PREFIX.join("opt", dep.name)
fixopt(dep) unless opt.directory?
end

View File

@ -36,7 +36,7 @@ module Homebrew extend self
end
def rm_opt_link name
optlink = HOMEBREW_PREFIX/:opt/name
optlink = HOMEBREW_PREFIX.join("opt", name)
optlink.unlink if optlink.symlink?
end

View File

@ -321,7 +321,7 @@ class Pathname
end
def find_formula
[self/:Formula, self/:HomebrewFormula, self].each do |d|
[join("Formula"), join("HomebrewFormula"), self].each do |d|
if d.exist?
d.children.each do |pn|
yield pn if pn.extname == ".rb"

View File

@ -248,7 +248,7 @@ class Keg < Pathname
end
def optlink
from = HOMEBREW_PREFIX/:opt/fname
from = HOMEBREW_PREFIX.join("opt", fname)
if from.symlink?
from.delete
elsif from.directory?