summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-23 02:03:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-23 02:03:51 +0000
commitbedc6fdf8846a416b76cd6aa17b1d9cef47e82b6 (patch)
tree161c85af5c62b5e32ed5dfeaff6078fe7deaf4a6 /vm_method.c
parent10cf7c5b2a079473db81af6dd3aad29dd779d8b1 (diff)
vm_method.c: check if klass is 0
* vm_method.c (rb_method_entry_get_without_cache): me->klass is 0 for a method aliased in a module. [ruby-core:61636] [Bug #9663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index 2279190..06ff053 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -578,7 +578,7 @@ rb_method_entry_get_without_cache(VALUE klass, ID id,
VALUE defined_class;
rb_method_entry_t *me = search_method(klass, id, &defined_class);
- if (me) {
+ if (me && !me->klass) {
switch (BUILTIN_TYPE(me->klass)) {
case T_CLASS:
if (RBASIC(klass)->flags & FL_SINGLETON) break;