Without this patch the location_for helper method in the Gemfile
incorrectly assumes the mdata variable has a value. This patch
addresses the problem by explicitly binding the regular expression match
results to the mdata variable to ensure it has a value when accessed by
index.
mdata = /^(git:[^#]*)#(.*)/.match(place)
if mdata
[fake_version, { :git => mdata[1], :branch => mdata[2], :require => false }].compact
- elsif place =~ /^file:\/\/(.*)/
+ elsif mdata = /^file:\/\/(.*)/.match(place)
['>= 0', { :path => File.expand_path(mdata[1]), :require => false }]
else
[place, { :require => false }]