aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/create.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb
index ac936818a..ed71a6d39 100644
--- a/Library/Homebrew/cmd/create.rb
+++ b/Library/Homebrew/cmd/create.rb
@@ -110,8 +110,7 @@ class FormulaCreator
when %r{github\.com/\S+/(\S+)/archive/}
@name = $1
else
- /(.*?)[-_.]?#{Regexp.escape(path.version)}/.match path.basename
- @name = $1
+ @name = path.basename.to_s[/(.*?)[-_.]?#{Regexp.escape(path.version.to_s)}/, 1]
end
end
update_path