summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yjit.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/yjit.rb b/yjit.rb
index 988f20fa44..062784f564 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -195,14 +195,11 @@ module RubyVM::YJIT
# Produce a list of instructions compiled by YJIT for an iseq
def self.insns_compiled(iseq)
+ return nil unless self.enabled?
+
# If a method or proc is passed in, get its iseq
iseq = RubyVM::InstructionSequence.of(iseq)
-
- if self.enabled?
- Primitive.rb_yjit_insns_compiled(iseq)
- else
- Qnil
- end
+ Primitive.rb_yjit_insns_compiled(iseq)
end
# Free and recompile all existing JIT code