diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-05 07:02:48 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-05 07:02:48 +0000 |
commit | 3c5cefff55357697c7b94f68dbce7a5347c33d15 (patch) | |
tree | 9d99fb35b56abbe8a900f791d8f34c9151d32088 | |
parent | 701adcdb596d7fa874a88d384aa8d4725b07c6aa (diff) | |
download | ruby-3c5cefff55357697c7b94f68dbce7a5347c33d15.tar.gz ruby-3c5cefff55357697c7b94f68dbce7a5347c33d15.tar.xz ruby-3c5cefff55357697c7b94f68dbce7a5347c33d15.zip |
* eval_method.h (rb_alias) : fix to check search result
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval_method.h | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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 diff --git a/eval_method.h b/eval_method.h index 7f2c99d1f..a99e6bea9 100644 --- a/eval_method.h +++ b/eval_method.h @@ -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)); } } |