diff options
Diffstat (limited to 'lib/bundler/current_ruby.rb')
-rw-r--r-- | lib/bundler/current_ruby.rb | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb index f9987c4da8..93e0c401c0 100644 --- a/lib/bundler/current_ruby.rb +++ b/lib/bundler/current_ruby.rb @@ -22,6 +22,8 @@ module Bundler 2.7 3.0 3.1 + 3.2 + 3.3 ].freeze KNOWN_MAJOR_VERSIONS = KNOWN_MINOR_VERSIONS.map {|v| v.split(".", 2).first }.uniq.freeze @@ -41,7 +43,7 @@ module Bundler ].freeze def ruby? - return true if Bundler::GemHelpers.generic_local_platform == Gem::Platform::RUBY + return true if Bundler::GemHelpers.generic_local_platform_is_ruby? !windows? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby") end @@ -69,26 +71,10 @@ module Bundler def windows? Gem.win_platform? end - - def mswin? - # For backwards compatibility - windows? - - # TODO: This should correctly be: - # windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin32" && Bundler.local_platform.cpu == "x86" - end - - def mswin64? - windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin64" && Bundler.local_platform.cpu == "x64" - end - - def mingw? - windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mingw32" && Bundler.local_platform.cpu != "x64" - end - - def x64_mingw? - Gem.win_platform? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os.start_with?("mingw") && Bundler.local_platform.cpu == "x64" - end + alias_method :mswin?, :windows? + alias_method :mswin64?, :windows? + alias_method :mingw?, :windows? + alias_method :x64_mingw?, :windows? (KNOWN_MINOR_VERSIONS + KNOWN_MAJOR_VERSIONS).each do |version| trimmed_version = version.tr(".", "") |