summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c
index 05c99b9905..9d33a4e69f 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -522,6 +522,8 @@ rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *de
rb_method_definition_release(me->def);
*(rb_method_definition_t **)&me->def = method_definition_addref(def, METHOD_ENTRY_COMPLEMENTED(me));
+ if (!ruby_running) add_opt_method_entry(me);
+
if (opts != NULL) {
switch (def->type) {
case VM_METHOD_TYPE_ISEQ: