diff options
Diffstat (limited to 'Library/Homebrew/cmd/search.rb')
| -rw-r--r-- | Library/Homebrew/cmd/search.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 2b35dfc36..b2d069744 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -93,7 +93,7 @@ module Homebrew def query_regexp(query) case query - when %r{^/(.*)/$} then Regexp.new($1) + when %r{^/(.*)/$} then Regexp.new(Regexp.last_match(1)) else /.*#{Regexp.escape(query)}.*/i end rescue RegexpError |
