diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-21 14:39:51 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-21 15:49:14 +0900 |
| commit | 1d160ed0591fbaabe1ae6d76920da409e238b396 (patch) | |
| tree | 9ea0e51210644c3e70adca1a8f88996591dc6d1a | |
| parent | 451c12099472764f1190df8db451dbeaedd1b1c8 (diff) | |
Fixed warning for String comparison of Gem::Version
| -rw-r--r-- | lib/bundler/definition.rb | 2 | ||||
| -rw-r--r-- | lib/rubygems/version.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index ca41d7953d..437390f3ec 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -1114,7 +1114,7 @@ module Bundler end def find_source_requirements - if Gem.ruby_version >= "3.3" + if Gem.ruby_version >= Gem::Version.new("3.3") # Ruby 3.2 has a bug that incorrectly triggers a circular dependency warning. This version will continue to # fetch git repositories one by one. preload_git_sources diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb index 43a0e4e783..a88a4a49ee 100644 --- a/lib/rubygems/version.rb +++ b/lib/rubygems/version.rb @@ -345,7 +345,7 @@ class Gem::Version def <=>(other) if String === other unless Gem::Deprecate.skip - warn "comparing version objects with strings is deprecated and will be removed" + warn "comparing version objects with strings is deprecated and will be removed", uplevel: 1 end return unless self.class.correct?(other) return self <=> self.class.new(other) |
