From 44af0d80e88035419f2324005c77e2444d083e7d Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Sun, 8 May 2016 20:35:52 +0200 Subject: utils/bottles: fix Regexp escaping for Ruby 1.8 Make sure `Regexp.escape` gets a string as Ruby 1.8 is unable to convert the symbol to a string automatically. Related to changes from #168. --- Library/Homebrew/utils/bottles.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/utils/bottles.rb b/Library/Homebrew/utils/bottles.rb index 6a05a7aeb..8447f2472 100644 --- a/Library/Homebrew/utils/bottles.rb +++ b/Library/Homebrew/utils/bottles.rb @@ -25,7 +25,7 @@ module Utils end def native_regex - /(\.#{Regexp.escape(tag)}\.bottle\.(\d+\.)?tar\.gz)$/o + /(\.#{Regexp.escape(tag.to_s)}\.bottle\.(\d+\.)?tar\.gz)$/o end def receipt_path(bottle_file) -- cgit v1.2.3