Skip to content

Commit 04afba2

Browse files
committed
[GR-15452] Update terminology in TruffleRuby methods.
PullRequest: truffleruby/819
2 parents 8e86474 + 8380d8c commit 04afba2

File tree

14 files changed

+36
-17
lines changed

14 files changed

+36
-17
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Compatibility:
1111
* `do...end` blocks can now have `rescue/else/ensure` clauses like MRI (#1618).
1212

1313
# 1.0 RC 16, 19 April 2019
14+
Changes:
15+
16+
* `TruffleRuby.sulong?` has been replaced by `TruffleRuby.cexts?`, and `TruffleRuby.graal?` has been replaced by `TruffleRuby.jit?`. The old methods will continue to work for now, but will produce warnings, and will be removed at a future release.
17+
18+
# 1.0 RC 16
1419

1520
Bug fixes:
1621

doc/samples/can-we-fold-yet.rb

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

1111
require 'readline'
1212

13-
unless TruffleRuby.graal?
13+
unless TruffleRuby.jit?
1414
puts 'You need the GraalVM Compiler to run this'
1515
exit
1616
end

doc/user/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ chris.seaton@oracle.com.
8989

9090
`ruby --version` will report `GraalVM CE` or `EE`.
9191

92-
`TruffleRuby.graal?` will tell you if you are also running with the GraalVM
92+
`TruffleRuby.jit?` will tell you if you are also running with the GraalVM
9393
Compiler.
9494

9595
### How do I know that I'm using the Community Edition of GraalVM?

doc/user/truffleruby-additions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ standard `RUBY_ENGINE_VERSION` constant.
3535
TruffleRuby provides these non-standard methods and classes that provide
3636
additional functionality in the `TruffleRuby` module.
3737

38-
`TruffleRuby.graal?` reports if the GraalVM Compiler is available and will be
38+
`TruffleRuby.jit?` reports if the GraalVM Compiler is available and will be
3939
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/graal/assert_constant_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
-> { Truffle::Graal.send(:assert_constant, 14 + 2) }.should raise_error(RuntimeError)
1515
end
1616

17-
unless TruffleRuby.graal?
17+
unless TruffleRuby.jit?
1818
it "returns the value of the argument" do
1919
Truffle::Graal.assert_constant(14 + 2).should == 16
2020
end

spec/truffle/graal/assert_not_compiled_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
-> { Truffle::Graal.send(:assert_not_compiled) }.should raise_error(RuntimeError)
1515
end
1616

17-
unless TruffleRuby.graal?
17+
unless TruffleRuby.jit?
1818
it "returns nil" do
1919
Truffle::Graal.assert_not_compiled.should be_nil
2020
end

spec/truffle/launcher_spec.rb

Lines changed: 2 additions & 2 deletions
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
@@ -298,7 +298,7 @@ def should_print_full_java_command(options, env: {})
298298
out.should_not include('RubyLauncher.main')
299299
end
300300

301-
guard -> { TruffleRuby.graal? } do
301+
guard -> { TruffleRuby.jit? } do
302302
it "applies Truffle options" do
303303
options = [
304304
"--vm.Dgraal.TraceTruffleCompilation=true",

spec/truffle/truffleruby/graal_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.graal?" do
11+
describe "TruffleRuby.jit?" do
1212

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

1717
end

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? jit? 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

0 commit comments

Comments
 (0)