diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-01-12 12:09:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 15:09:32 -0500 |
commit | da7e5c7b776e8ebbbef97c15305fbad5d032242b (patch) | |
tree | fbb3d461e4fe24e507c2099ac83c04d5074f461f /yjit.rb | |
parent | 8d3ff663899211c9c0ca2a8cf7d994e7acd3f83e (diff) |
YJIT: Do not refer to an undefined constant (#7112)
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.rb')
-rw-r--r-- | yjit.rb | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 |