summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Wanninger <ajwann@users.noreply.github.com>2017-08-13 09:31:01 -0400
committerAdam Wanninger <ajwann@users.noreply.github.com>2017-08-13 09:31:01 -0400
commit9375eb9545239f417986cd2276b0995bbb94cfab (patch)
tree589b8f7a129856ab50d6620f9569f6826ca369c0
parentb7a412a2de9a562629aeeda4d83b10ac2b50887a (diff)
downloadbundler-9375eb9545239f417986cd2276b0995bbb94cfab.tar.gz
use include? instead of match
-rw-r--r--lib/bundler/shared_helpers.rb2
-rw-r--r--spec/bundler/shared_helpers_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 07ea3e98b5..5d3956abc1 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -204,7 +204,7 @@ module Bundler
private
def validate_bundle_path
- return unless Bundler.bundle_path.to_s.match(File::PATH_SEPARATOR)
+ return unless Bundler.bundle_path.to_s.include?(File::PATH_SEPARATOR)
message = "Your bundle path contains a '#{File::PATH_SEPARATOR}', " \
"which is the path separator for your system. Bundler cannot " \
"function correctly when the Bundle path contains the " \
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb
index cca20e3bca..a04633568d 100644
--- a/spec/bundler/shared_helpers_spec.rb
+++ b/spec/bundler/shared_helpers_spec.rb
@@ -263,7 +263,7 @@ RSpec.describe Bundler::SharedHelpers do
it "exits if bundle path contains the path seperator" do
stub_const("File::PATH_SEPARATOR", ":".freeze)
- allow(Bundler).to receive(:bundle_path) { "so:me/dir/bin" }
+ allow(Bundler).to receive(:bundle_path) { Pathname.new("so:me/dir/bin") }
expect { subject.send(:validate_bundle_path) }.to raise_error(
Bundler::PathError,
"Your bundle path contains a ':', which is the " \