Skip to content

Commit 8cca385

Browse files
committed
Use RUBY_ENGINE instead of RUBY_PLATFORM
1 parent ef15824 commit 8cca385

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
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 RUBY_PLATFORM != Gem::Platform::JAVA
43+
if RUBY_ENGINE != "jruby"
4444
warn "Source #{source} is ignoring #{self} because it is missing extensions"
4545
end
4646

bundler/spec/bundler/stub_specification_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
end
5656

5757
describe "#ignored?" do
58-
skip "This example is only for without JRuby" if RUBY_ENGINE == 'jruby'
58+
skip "This example is only for without JRuby" if RUBY_ENGINE == "jruby"
5959

6060
it "returns true if the gem is for different platform" do
6161
stub = described_class.from_stub(with_java_gem_stub_spec)

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. " \

test/rubygems/test_gem_stub_specification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_contains_requirable_file_eh_extension
7171
refute stub.contains_requirable_file? "nonexistent"
7272
end
7373

74-
expected = if RUBY_PLATFORM == "java"
74+
expected = if RUBY_ENGINE == "jruby"
7575
""
7676
else
7777
"Ignoring stub_e-2 because its extensions are not built. " \

0 commit comments

Comments
 (0)