summaryrefslogtreecommitdiff
path: root/yjit.rb
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2021-06-25 13:14:39 -0700
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:37 -0400
commit4dc821e643fc8b3356b8c868014d42bdff0f8cee (patch)
tree26f9ca9c316d296d8d5e44e532b164618c1d2c6e /yjit.rb
parent9a436da064b966c1278ac530c6d6f2d02b0636dc (diff)
Add YJIT.enabled?
Diffstat (limited to 'yjit.rb')
-rw-r--r--yjit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/yjit.rb b/yjit.rb
index 0a44e2bfab..afd1071250 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -134,6 +134,10 @@ module YJIT
Primitive.reset_stats_bang
end
+ def self.enabled?
+ Primitive.cexpr! 'rb_yjit_enabled_p() ? Qtrue : Qfalse'
+ end
+
class << self
private