diff options
Diffstat (limited to 'eval_method.c')
-rw-r--r-- | eval_method.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eval_method.c b/eval_method.c index ff26ebe083..f7043c0069 100644 --- a/eval_method.c +++ b/eval_method.c @@ -388,6 +388,9 @@ rb_export_method(VALUE klass, ID name, ID noex) rb_print_undef(klass, name, 0); } if (fbody->nd_body->nd_noex != noex) { + if (nd_type(fbody->nd_body->nd_body) == NODE_CFUNC) { + rb_vm_check_redefinition_opt_method(fbody); + } if (klass == origin) { fbody->nd_body->nd_noex = noex; } |