mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_method.c (rb_method_node): fail earlier if no method found.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
84b144f6de
commit
cf6334e1cb
2 changed files with 5 additions and 2 deletions
|
@ -292,8 +292,9 @@ rb_method_node(VALUE klass, ID id)
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue