diff --git a/yjit_iface.c b/yjit_iface.c index ff8c52c4b9..90b4ed9555 100644 --- a/yjit_iface.c +++ b/yjit_iface.c @@ -702,6 +702,11 @@ comments_for(rb_execution_context_t *ec, VALUE self, VALUE start_address, VALUE static VALUE get_yjit_stats(rb_execution_context_t *ec, VALUE self) { + // Return Qnil if YJIT isn't enabled + if (cb == NULL) { + return Qnil; + } + VALUE hash = rb_hash_new(); RB_VM_LOCK_ENTER();