summaryrefslogtreecommitdiff
path: root/lib/rubygems/path_support.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/path_support.rb')
-rw-r--r--lib/rubygems/path_support.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/path_support.rb b/lib/rubygems/path_support.rb
index d9df543ad9..b596b4f6b8 100644
--- a/lib/rubygems/path_support.rb
+++ b/lib/rubygems/path_support.rb
@@ -53,7 +53,7 @@ class Gem::PathSupport
gem_path = gpaths.split(Gem.path_separator)
# Handle the path_separator being set to a regexp, which will cause
# end_with? to error
- if gpaths =~ /#{Gem.path_separator}\z/
+ if /#{Gem.path_separator}\z/.match?(gpaths)
gem_path += default_path
end