ruby-changes:7377
From: matz <ko1@a...>
Date: Thu, 28 Aug 2008 21:08:36 +0900 (JST)
Subject: [ruby-changes:7377] Ruby:r18896 (trunk): * vm_method.c (rb_method_node): fail earlier if no method found.
matz 2008-08-28 21:08:19 +0900 (Thu, 28 Aug 2008) New Revision: 18896 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18896 Log: * vm_method.c (rb_method_node): fail earlier if no method found. Modified files: trunk/ChangeLog trunk/vm_method.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18895) +++ ChangeLog (revision 18896) @@ -7,6 +7,8 @@ * object.c (convert_type): call less rb_intern() less frequently by using cache structure. + * vm_method.c (rb_method_node): fail earlier if no method found. + Thu Aug 28 19:04:50 2008 NAKAMURA Usaku <usa@r...> * bootstraptest/test_io.rb: no need to create real file. Index: vm_method.c =================================================================== --- vm_method.c (revision 18895) +++ vm_method.c (revision 18896) @@ -292,8 +292,9 @@ struct cache_entry *ent; ent = cache + EXPR1(klass, id); - if (ent->mid == id && ent->klass == klass && ent->method) { - return ent->method; + if (ent->mid == id && ent->klass == klass) { + if (ent->method) return ent->method; + return 0; } return rb_get_method_body(klass, id, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/