Skip to content

Commit 5a2ad5d

Browse files
committed
[GR-17457] Move Gem::Platform::REUSE_AS_BINARY_ON_TRUFFLERUBY to defaults/truffleruby.rb
PullRequest: truffleruby/3600
2 parents 32dd3e1 + d8db14d commit 5a2ad5d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/mri/rubygems/platform.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ def self.match_spec?(spec)
3636
match_gem?(spec.platform, spec.name)
3737
end
3838

39-
REUSE_AS_BINARY_ON_TRUFFLERUBY = %w[libv8 libv8-node sorbet-static]
40-
4139
def self.match_gem?(platform, gem_name)
4240
raise unless String === gem_name
4341
if REUSE_AS_BINARY_ON_TRUFFLERUBY.include?(gem_name)

lib/truffle/rubygems/defaults/truffleruby.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ def self.default_dir
2424

2525
def self.platform_defaults
2626
# disable documentation by default as it takes a significant amount of time for installing gems and is rarely used
27-
{
28-
'gem' => '--no-document'
29-
}
27+
{ 'gem' => '--no-document' }
3028
end
3129
end
30+
31+
class Gem::Platform
32+
# The list of gems we want to install precompiled (using the local platform) on TruffleRuby
33+
REUSE_AS_BINARY_ON_TRUFFLERUBY = %w[libv8 libv8-node sorbet-static]
34+
end

0 commit comments

Comments
 (0)