summaryrefslogtreecommitdiffstats
path: root/eval_method.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 13:32:57 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 13:32:57 +0000
commitba6f1242866b732c20eb5bd629656ab0cb355576 (patch)
tree590a6b41b7e0a33e640f2f78b7683f2827c59754 /eval_method.h
parent76d0b45e8bb8988d5c92eca66f07820c61923c28 (diff)
downloadruby-ba6f1242866b732c20eb5bd629656ab0cb355576.tar.gz
ruby-ba6f1242866b732c20eb5bd629656ab0cb355576.tar.xz
ruby-ba6f1242866b732c20eb5bd629656ab0cb355576.zip
* eval_method.h (rb_add_method): fix to check 0.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_method.h')
-rw-r--r--eval_method.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval_method.h b/eval_method.h
index ac092d7bc..1f4ba33d2 100644
--- a/eval_method.h
+++ b/eval_method.h
@@ -150,7 +150,7 @@ rb_add_method(VALUE klass, ID mid, NODE * node, int noex)
rb_warning("method redefined; discarding old %s", rb_id2name(mid));
}
}
- if (klass == rb_cObject && node->nd_mid == init) {
+ if (klass == rb_cObject && node && node->nd_mid == init) {
rb_warn("redefining Object#initialize may cause infinite loop");
}
}