summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-23 08:27:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-23 08:27:06 +0000
commit2a3193fd79c0115b2235b880fc2b28c4d94f39bc (patch)
tree65e40472106b90f927f2b3ef9e9928fc9c9e4a79 /eval.c
parent168b939d911283206ce1aa4baa3d396f0c0f100f (diff)
downloadruby-2a3193fd79c0115b2235b880fc2b28c4d94f39bc.tar.gz
ruby-2a3193fd79c0115b2235b880fc2b28c4d94f39bc.tar.xz
ruby-2a3193fd79c0115b2235b880fc2b28c4d94f39bc.zip
* eval.c (rb_eval): do not warn discarding already undefined
method. * lib/rational.rb: undef quo before replacing. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 171eadf0f..6fcfdb0d5 100644
--- a/eval.c
+++ b/eval.c
@@ -3203,7 +3203,7 @@ rb_eval(self, n)
rb_frozen_class_p(ruby_class);
body = search_method(ruby_class, node->nd_mid, &origin);
if (body){
- if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0) {
+ if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
}
}