aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorXu Cheng2016-03-31 17:08:00 +0800
committerXu Cheng2016-03-31 17:10:22 +0800
commit028d155e97014076adf4e4dbc7c888fd871de321 (patch)
tree9d7be2b2d1319e8efcdfaa727c73cb8cbb595009 /Library/Homebrew
parentebfd096826224b712929cf73e347cf09b98ce47f (diff)
downloadbrew-028d155e97014076adf4e4dbc7c888fd871de321.tar.bz2
Pathname#version: only parse version from file basename
i.e. Ignoring the file's directory for version parsing. Closes Homebrew/homebrew#50568. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/extend/pathname.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 3f898fecb..284dc85f8 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -239,7 +239,7 @@ class Pathname
# @private
def version
require "version"
- Version.parse(self)
+ Version.parse(basename)
end
# @private