diff options
Diffstat (limited to 'eval_method.ci')
-rw-r--r-- | eval_method.ci | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eval_method.ci b/eval_method.ci index a6b8264e2b..4e07ee7d6e 100644 --- a/eval_method.ci +++ b/eval_method.ci @@ -149,7 +149,7 @@ rb_add_method(VALUE klass, ID mid, NODE * node, int noex) if (nd_type(old_node->nd_body->nd_body) == NODE_CFUNC) { rb_vm_check_redefinition_opt_method(old_node); } - if (RTEST(ruby_verbose) && old_node->nd_cnt == 0 && old_node->nd_body) { + if (RTEST(ruby_verbose) && node && old_node->nd_cnt == 0 && old_node->nd_body) { rb_warning("method redefined; discarding old %s", rb_id2name(mid)); } } |