aboutsummaryrefslogtreecommitdiffstats
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
commita5c2d584284e2b137b1d4d06574470a971c9087e (patch)
tree590a6b41b7e0a33e640f2f78b7683f2827c59754 /eval_method.h
parent62deb7dbbda5104c352abd723053bd1b18e50dbf (diff)
downloadruby-a5c2d584284e2b137b1d4d06574470a971c9087e.tar.gz
* eval_method.h (rb_add_method): fix to check 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/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 ac092d7bcc..1f4ba33d2f 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");
}
}