* eval_method.h (rb_alias) : fix to check search result

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-01-05 07:02:48 +00:00
parent d880d4382f
commit 20f8b25d1d
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Fri Jan 5 15:58:15 2007 Koichi Sasada <ko1@atdot.net>
* eval_method.h (rb_alias) : fix to check search result
Fri Jan 5 13:59:53 2007 Koichi Sasada <ko1@atdot.net>
* eval_method.h (rb_add_method) : fix to check old_node

View File

@ -561,7 +561,7 @@ rb_alias(VALUE klass, ID name, ID def)
if (RTEST(ruby_verbose) &&
st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *) & node)) {
if (node->nd_cnt == 0 && node->nd_body) {
if (node && node->nd_cnt == 0 && node->nd_body) {
rb_warning("discarding old %s", rb_id2name(name));
}
}