summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-08 08:05:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-08 08:05:03 +0000
commit3f8ceab90ee1c5f6fdb873d69be0236b24e17060 (patch)
tree7e0d903a89a9b530af116b1798fd26ecec5669ff /vm_method.c
parentd763d45da2cac18101d366ed595a6cfe1db5c677 (diff)
vm_method.c: no super klass, no original method entry
* vm_method.c (rb_method_entry): if no super class, no original method entry. [ruby-core:67389] [Bug #10707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index 97ae64f..289c77a 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -668,12 +668,17 @@ get_original_method_entry(VALUE refinements,
const rb_method_entry_t *me,
VALUE *defined_class_ptr)
{
+ VALUE super;
+
if (me->def->body.orig_me) {
return me->def->body.orig_me;
}
+ else if (!(super = RCLASS_SUPER(me->klass))) {
+ return 0;
+ }
else {
rb_method_entry_t *tmp_me;
- tmp_me = rb_method_entry(RCLASS_SUPER(me->klass), me->called_id,
+ tmp_me = rb_method_entry(super, me->called_id,
defined_class_ptr);
return rb_resolve_refined_method(refinements, tmp_me,
defined_class_ptr);