aboutsummaryrefslogtreecommitdiffstats
path: root/eval_method.ci
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-18 17:31:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-18 17:31:39 +0000
commit9cef6acdc7c377d30dbfa6fa9f56b1097b2ba998 (patch)
treeee0a5d1b17b31fa9b67be9e277f7be56e32f1fc0 /eval_method.ci
parent94175959938eff1977b6895e98c626bae31788ac (diff)
downloadruby-9cef6acdc7c377d30dbfa6fa9f56b1097b2ba998.tar.gz
* eval_method.ci (rb_add_method): no redefinition warning for undef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_method.ci')
-rw-r--r--eval_method.ci2
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));
}
}