Pathname.stem knows about bottles

This commit is contained in:
Max Howell 2012-03-06 20:11:46 +00:00
parent b63ec18564
commit 1b4b8a722e

View File

@ -100,6 +100,7 @@ class Pathname
# extended to support common double extensions # extended to support common double extensions
def extname def extname
return $1 if to_s =~ /(\.bottle\.tar\.gz)$/
/(\.(tar|cpio)\.(gz|bz2|xz|Z))$/.match to_s /(\.(tar|cpio)\.(gz|bz2|xz|Z))$/.match to_s
return $1 if $1 return $1 if $1
return File.extname(to_s) return File.extname(to_s)