* eval.c (rb_eval): do not warn discarding already undefined
method. * lib/rational.rb: undef quo before replacing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8637a41d2a
commit
333eb8380f
@ -1,3 +1,10 @@
|
|||||||
|
Thu Jan 23 17:25:04 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_eval): do not warn discarding already undefined
|
||||||
|
method.
|
||||||
|
|
||||||
|
* lib/rational.rb: undef quo before replacing.
|
||||||
|
|
||||||
Thu Jan 23 15:49:57 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Thu Jan 23 15:49:57 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* parse.y (arg): missing arguments.
|
* parse.y (arg): missing arguments.
|
||||||
|
2
eval.c
2
eval.c
@ -3203,7 +3203,7 @@ rb_eval(self, n)
|
|||||||
rb_frozen_class_p(ruby_class);
|
rb_frozen_class_p(ruby_class);
|
||||||
body = search_method(ruby_class, node->nd_mid, &origin);
|
body = search_method(ruby_class, node->nd_mid, &origin);
|
||||||
if (body){
|
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));
|
rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,6 +317,7 @@ class Fixnum
|
|||||||
alias power! **;
|
alias power! **;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
undef quo
|
||||||
def quo(other)
|
def quo(other)
|
||||||
Rational.new!(self,1) / other
|
Rational.new!(self,1) / other
|
||||||
end
|
end
|
||||||
@ -340,6 +341,7 @@ class Bignum
|
|||||||
alias power! **
|
alias power! **
|
||||||
end
|
end
|
||||||
|
|
||||||
|
undef quo
|
||||||
def quo(other)
|
def quo(other)
|
||||||
Rational.new!(self,1) / other
|
Rational.new!(self,1) / other
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user