diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 3792e0a7b2..a17f114f83 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -33,7 +33,7 @@ class Formula def initialize name='__UNKNOWN__', path=nil @name = name # If we got an explicit path, use that, else determine from the name - @path = path.nil? ? self.class.path(name) : Pathname.new(path).expand_path + @path = path.nil? ? self.class.path(name) : path @homepage = self.class.homepage set_spec :stable diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index c4e1be1c73..b733242e89 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -105,7 +105,7 @@ class Formulary # in our codebase will require an exact and fullpath. path = "#{path}.rb" unless path =~ /\.rb$/ - @path = Pathname.new(path) + @path = Pathname.new(path).expand_path @name = @path.stem end