summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--iseq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 15635332ff..38f756d9c8 100644
--- a/iseq.c
+++ b/iseq.c
@@ -292,6 +292,10 @@ static bool
cc_is_active(const struct rb_callcache *cc, bool reference_updating)
{
if (cc) {
+ if (cc == rb_vm_empty_cc() || rb_vm_empty_cc_for_super()) {
+ return false;
+ }
+
if (reference_updating) {
cc = (const struct rb_callcache *)rb_gc_location((VALUE)cc);
}