Skip to content

Commit c316ba9

Browse files
committed
Use RUBY_ENGINE instead of RUBY_PLATFORM
1 parent af06eff commit c316ba9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

bundler/lib/bundler/stub_specification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def ignored?
4040

4141
# If we share GEM_HOME for all of Ruby platform, the platform specific gem always warn that specification.
4242
# ex `jruby-launcher` and CRuby
43-
if platform == Gem::Platform::RUBY && RUBY_PLATFORM != Gem::Platform::JAVA
43+
if platform == Gem::Platform::RUBY && RUBY_ENGINE != 'jruby'
4444
warn "Source #{source} is ignoring #{self} because it is missing extensions"
4545
end
4646

lib/rubygems/basic_specification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def contains_requirable_file?(file)
7575
if platform == Gem::Platform::RUBY || Gem::Platform.local === platform
7676
# RubyGems warns gem specification of C extensions. But JRuby couldn't
7777
# rebuild with `gem pristine` command. So, we skip the warning.
78-
if RUBY_PLATFORM != "java" # JRuby
78+
if RUBY_ENGINE != 'jruby'
7979
warn "Ignoring #{full_name} because its extensions are not built. " \
8080
"Try: gem pristine #{name} --version #{version}"
8181
end

test/rubygems/test_gem.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ def test_self_try_activate_missing_extensions
13081308
refute Gem.try_activate "nonexistent"
13091309
end
13101310

1311-
expected = if RUBY_PLATFORM == "java"
1311+
expected = if RUBY_ENGINE == 'jruby'
13121312
""
13131313
else
13141314
"Ignoring ext-1 because its extensions are not built. " \

test/rubygems/test_gem_specification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,7 @@ def test_contains_requirable_file_eh_extension
15571557
refute @ext.contains_requirable_file? "nonexistent"
15581558
end
15591559

1560-
expected = if RUBY_PLATFORM == "java"
1560+
expected = if RUBY_ENGINE == 'jruby'
15611561
""
15621562
else
15631563
"Ignoring ext-1 because its extensions are not built. " \

0 commit comments

Comments
 (0)