* eval.c (rb_method_node): search cache entry first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2004-05-18 00:32:30 +00:00
parent bd0cd7f92b
commit e0e8ee0ac8
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Tue May 18 09:30:25 2004 SASADA Koichi <ko1@atdot.net>
* eval.c (rb_method_node): search cache entry first.
Mon May 17 16:04:06 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> Mon May 17 16:04:06 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* numeric.c (flo_to_s): p 0.0 should be '0.0' not '0.0e+00'. * numeric.c (flo_to_s): p 0.0 should be '0.0' not '0.0e+00'.

6
eval.c
View File

@ -452,6 +452,12 @@ rb_method_node(klass, id)
ID id; ID id;
{ {
int noex; int noex;
struct cache_entry *ent;
ent = cache + EXPR1(klass, id);
if (ent->mid == id && ent->klass == klass && ent->method){
return ent->method;
}
return rb_get_method_body(&klass, &id, &noex); return rb_get_method_body(&klass, &id, &noex);
} }