summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-01 16:57:22 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-01 17:02:04 +0900
commit789da481fc59ffb1a0d4e4deb0a17ec4fcbd1d58 (patch)
treea327f8d5d39e5d931645c14f31eeecf6484f19d3
parent069cca6f7459da5cc502d0c51f60a9813c611b31 (diff)
Prefer RBOOL
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5385
-rw-r--r--insns.def2
-rw-r--r--yjit.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/insns.def b/insns.def
index 87624a0500..30b7c626d7 100644
--- a/insns.def
+++ b/insns.def
@@ -693,7 +693,7 @@ checktype
(VALUE val)
(VALUE ret)
{
- ret = (TYPE(val) == (int)type) ? Qtrue : Qfalse;
+ ret = RBOOL(TYPE(val) == (int)type);
}
/**********************************************************/
diff --git a/yjit.rb b/yjit.rb
index 0bc353992c..09ed3faaf3 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -149,7 +149,7 @@ module RubyVM::YJIT
end
def self.enabled?
- Primitive.cexpr! 'rb_yjit_enabled_p() ? Qtrue : Qfalse'
+ Primitive.cexpr! 'RBOOL(rb_yjit_enabled_p())'
end
def self.simulate_oom!