Skip to content

Commit ecc4682

Browse files
committed
Rename TruffleRuby.sulong? to TruffleRuby.cexts?.
1 parent 18c82f9 commit ecc4682

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

doc/user/truffleruby-additions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ used.
4040

4141
`TruffleRuby.native?` reports if TruffleRuby is compiled as a native image.
4242

43-
`TruffleRuby.sulong?` reports if TruffleRuby has the GraalVM LLVM Runtime for C
43+
`TruffleRuby.cexts?` reports if TruffleRuby has the GraalVM LLVM Runtime for C
4444
extensions available.
4545

4646
`TruffleRuby.revision` reports the source control revision used to build

spec/truffle/launcher_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def should_print_full_java_command(options, env: {})
262262
out.should include("--ruby.load-paths=")
263263
end
264264

265-
guard -> { TruffleRuby.sulong? } do
265+
guard -> { TruffleRuby.cexts? } do
266266
it "prints help:languages containing llvm language options" do
267267
out = ruby_exe(nil, options: "--help:languages")
268268
$?.success?.should == true

spec/truffle/truffleruby/no_other_methods_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
it "contains no other public methods" do
1414
(TruffleRuby.methods - Module.new.methods).sort.should == %i{
15-
full_memory_barrier graal? native? revision sulong? synchronized
15+
full_memory_barrier graal? native? revision sulong? cexts? synchronized
1616
}.sort
1717
end
1818

spec/truffle/truffleruby/sulong_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
require_relative '../../ruby/spec_helper'
1010

11-
describe "TruffleRuby.sulong?" do
11+
describe "TruffleRuby.cexts?" do
1212

1313
it "returns a Boolean value" do
14-
TruffleRuby.sulong?.should be_true_or_false
14+
TruffleRuby.cexts?.should be_true_or_false
1515
end
1616

1717
end

src/main/java/org/truffleruby/extra/TruffleRubyNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public boolean isNative() {
5050

5151
}
5252

53-
@CoreMethod(names = "sulong?", onSingleton = true)
53+
@CoreMethod(names = "cexts?", onSingleton = true)
5454
public abstract static class SulongNode extends CoreMethodArrayArgumentsNode {
5555

5656
@Specialization

src/main/ruby/core/truffle/backward.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ def self.full_memory_barrier
3030
end
3131

3232
end
33+
34+
module TruffleRuby
35+
36+
def self.sulong?
37+
warn 'TruffleRuby.sulong? has been replaced by TruffleRuby.cexts? and will be removed at a future release', uplevel: 1
38+
cexts?
39+
end
40+
41+
end

0 commit comments

Comments
 (0)