From 3fedf8329d0b0916be1cf6ec27ca76e3b2233d03 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Wed, 9 Jun 2021 19:03:11 -0700 Subject: [PATCH] Check for refinements in gen_invokesuper --- yjit_codegen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yjit_codegen.c b/yjit_codegen.c index 4a8cf6ff32..4e593f1322 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -2929,6 +2929,11 @@ gen_invokesuper(jitstate_t *jit, ctx_t *ctx) VALUE current_defined_class = me->defined_class; ID mid = me->def->original_id; + + // vm_search_normal_superclass + if (BUILTIN_TYPE(current_defined_class) == T_ICLASS && FL_TEST_RAW(RBASIC(current_defined_class)->klass, RMODULE_IS_REFINEMENT)) { + return YJIT_CANT_COMPILE; + } VALUE comptime_superclass = RCLASS_SUPER(RCLASS_ORIGIN(current_defined_class)); const struct rb_callinfo *ci = cd->ci;