summaryrefslogtreecommitdiff
path: root/lib/bundler/source/path.rb
diff options
context:
space:
mode:
authorVictor Koronen <koronen@kth.se>2015-08-13 20:09:53 +0200
committerVictor Koronen <koronen@kth.se>2015-08-13 20:09:53 +0200
commit122518fb89d97628589782e0fdac72f716496d18 (patch)
tree8e3fa08278c610e03629fa47c8a00f6df19c8685 /lib/bundler/source/path.rb
parent6fdbc5d2ac7d794df8044dc7e3c1ce99922e3ff1 (diff)
downloadbundler-122518fb89d97628589782e0fdac72f716496d18.tar.gz
Fix Style/RegexpLiteral
Diffstat (limited to 'lib/bundler/source/path.rb')
-rw-r--r--lib/bundler/source/path.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 0c408b4bbf..1772a819c9 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -165,7 +165,7 @@ module Bundler
end
def relative_path
- if path.to_s.match(%r{^#{Regexp.escape Bundler.root.to_s}})
+ if path.to_s.start_with?(Bundler.root.to_s)
return path.relative_path_from(Bundler.root)
end
path