Skip to content

Commit 8b116ee

Browse files
tenderlovematzbot
authored andcommitted
[ruby/rubygems] create a gem version instead of comparing with a string
ruby/rubygems@c1e3d4d63b
1 parent 9aa09b4 commit 8b116ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rubygems.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def self.activate_and_load_bin_path(name, exec_name = nil, *requirements)
287287
# RubyGems now uses this new `Gem.activate_and_load_bin_path` helper in
288288
# binstubs, which is of course not overridden in Bundler since it didn't
289289
# exist at the time. So, include the override here to workaround that.
290-
load ENV["BUNDLE_BIN_PATH"] if ENV["BUNDLE_BIN_PATH"] && spec.version <= "2.5.22"
290+
load ENV["BUNDLE_BIN_PATH"] if ENV["BUNDLE_BIN_PATH"] && spec.version <= Gem::Version.create("2.5.22")
291291

292292
# Make sure there's no version of Bundler in `$LOAD_PATH` that's different
293293
# from the version we just activated. If that was the case (it happens
@@ -666,7 +666,7 @@ def self.load_safe_marshal
666666
# warnings in platform constants
667667

668668
def self.load_bundler_extensions(version)
669-
return unless version <= "2.6.9"
669+
return unless version <= Gem::Version.create("2.6.9")
670670

671671
previous_platforms = {}
672672

0 commit comments

Comments
 (0)