ruby-changes:69122
From: Noah <ko1@a...>
Date: Thu, 21 Oct 2021 08:20:54 +0900 (JST)
Subject: [ruby-changes:69122] dd23e4658b (master): If codeblock is NULL because YJIT is disabled, YJIT.runtime_stats should return Qnil
https://git.ruby-lang.org/ruby.git/commit/?id=dd23e4658b From dd23e4658b8587adf8d6fed96b574a979b169e46 Mon Sep 17 00:00:00 2001 From: Noah Gibbs <noah.gibbs@s...> Date: Tue, 27 Jul 2021 16:54:45 +0100 Subject: If codeblock is NULL because YJIT is disabled, YJIT.runtime_stats should return Qnil --- yjit_iface.c | 5 +++++ 1 file changed, 5 insertions(+) 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 https://github.com/ruby/ruby/blob/trunk/yjit_iface.c#L702 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(); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/