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.
This commit is contained in:
Martin Afanasjew 2016-05-08 20:35:52 +02:00
parent 86fa42b36c
commit 44af0d80e8

View File

@ -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)