summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2024-02-19 18:53:13 -0800
committerJohn Hawthorn <[email protected]>2024-03-07 10:06:48 -0800
commit18ee7c9a108bf3424814565377c8796e5e455cf7 (patch)
treeb40de1223dd83a046d872a0b3a9be5df96d36585 /vm_method.c
parent4a4e5dd9c97f46ad3e5f463129d5340647702368 (diff)
Clear all refined CCs on reopening refinement mod
In cfd7729ce7a31c8b6ec5dd0e99c67b2932de4732 we started using inline caches for refinements. However, we weren't clearing inline caches when defined on a reopened refinement module. Fixes [Bug #20246]
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c
index ccd1ffb462..d76a1c2352 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -301,6 +301,7 @@ rb_clear_method_cache(VALUE klass_or_module, ID mid)
VALUE refined_class = rb_refinement_module_get_refined_class(module);
rb_clear_method_cache(refined_class, mid);
rb_class_foreach_subclass(refined_class, clear_iclass_method_cache_by_id_for_refinements, mid);
+ rb_clear_all_refinement_method_cache();
}
rb_class_foreach_subclass(module, clear_iclass_method_cache_by_id, mid);
}