diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 296bcfff38..01c725b031 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -329,10 +329,6 @@ module Gem without_gnu_nor_abi_modifiers end end - - if RUBY_ENGINE == "truffleruby" && !defined?(REUSE_AS_BINARY_ON_TRUFFLERUBY) - REUSE_AS_BINARY_ON_TRUFFLERUBY = %w[libv8 libv8-node sorbet-static].freeze - end end Platform.singleton_class.module_eval do diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 8c3e8bdc68..08ea348a1d 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -1386,17 +1386,6 @@ begin rescue LoadError end -# TruffleRuby >= 24 defines REUSE_AS_BINARY_ON_TRUFFLERUBY in defaults/truffleruby. -# However, TruffleRuby < 24 defines REUSE_AS_BINARY_ON_TRUFFLERUBY directly in its copy -# of lib/rubygems/platform.rb, so it is not defined if RubyGems is updated (gem update --system). -# Instead, we define it here in that case, similar to bundler/lib/bundler/rubygems_ext.rb. -# We must define it here and not in platform.rb because platform.rb is loaded before defaults/truffleruby. -class Gem::Platform - if RUBY_ENGINE == "truffleruby" && !defined?(REUSE_AS_BINARY_ON_TRUFFLERUBY) - REUSE_AS_BINARY_ON_TRUFFLERUBY = %w[libv8 libv8-node sorbet-static].freeze - end -end - ## # Loads the default specs. Gem::Specification.load_defaults