diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-22 08:20:23 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-24 16:57:07 +0900 |
commit | f6620037ba1477d2c337d7b511f094d6d0fbb69c (patch) | |
tree | 4d8d38eaf97e6ca88162dd574e7871e1739f22ae /lib/bundler/force_platform.rb | |
parent | d5635dfe36588b04d3dd6065ab4e422f51629b11 (diff) |
Merge RubyGems-3.4.0 and Bundler-2.4.0
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6987
Diffstat (limited to 'lib/bundler/force_platform.rb')
-rw-r--r-- | lib/bundler/force_platform.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/bundler/force_platform.rb b/lib/bundler/force_platform.rb new file mode 100644 index 0000000000..249a24ecd1 --- /dev/null +++ b/lib/bundler/force_platform.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Bundler + module ForcePlatform + private + + # The `:force_ruby_platform` value used by dependencies for resolution, and + # by locked specifications for materialization is `false` by default, except + # for TruffleRuby. TruffleRuby generally needs to force the RUBY platform + # variant unless the name is explicitly allowlisted. + + def default_force_ruby_platform + return false unless RUBY_ENGINE == "truffleruby" + + !Gem::Platform::REUSE_AS_BINARY_ON_TRUFFLERUBY.include?(name) + end + end +end |