summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/rubygems_integration.rb8
-rw-r--r--lib/bundler/shared_helpers.rb2
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 6f8a7608b0..1185625e03 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -208,6 +208,10 @@ module Bundler
Gem.bin_path(gem, bin, ver)
end
+ def path_separator
+ File::PATH_SEPARATOR
+ end
+
def preserve_paths
# this is a no-op outside of RubyGems 1.8
yield
@@ -788,6 +792,10 @@ module Bundler
def install_with_build_args(args)
yield
end
+
+ def path_separator
+ Gem.path_separator
+ end
end
# RubyGems 2.1.0
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 7a8dda6e60..a18966b324 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -221,7 +221,7 @@ module Bundler
private
def validate_bundle_path
- path_separator = Gem.respond_to?(:path_separator) ? Gem.path_separator : File::PATH_SEPARATOR
+ path_separator = Bundler.rubygems.path_separator
return unless Bundler.bundle_path.to_s.split(path_separator).size > 1
message = "Your bundle path contains text matching #{path_separator.inspect}, " \
"which is the path separator for your system. Bundler cannot " \