From 2237ffc24a82ae0352123aac93e64c6a3d37c15f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 23 Mar 2012 11:42:37 -0700 Subject: [PATCH] bundler root path should be escaped --- lib/bundler/source.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index 5e058752e08..0de9983d2c4 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -419,7 +419,7 @@ def cache(spec) private def relative_path - if path.to_s.match(%r{^#{Bundler.root.to_s}}) + if path.to_s.match(%r{^#{Regexp.escape Bundler.root.to_s}}) return path.relative_path_from(Bundler.root) end