summaryrefslogtreecommitdiff
path: root/method.h
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-25 06:01:25 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-25 06:01:25 +0000
commit94ec0a64197ab7a0edfb6599074df0a2920607e4 (patch)
tree687082f0a7811e404327e0ce8dac4b1f60621b7c /method.h
parent24bb5756b1e61279c0be437c10210ad26e951ffd (diff)
merge revision(s) 49222,49480,49493: [Backport #10765] [Backport #1010826]
method.h: UNDEFINED_REFINED_METHOD_P * method.h (UNDEFINED_REFINED_METHOD_P): macro to tell if refined original method is defined. * vm_method.c (remove_method): When remove refined method, raise a NameError if the method is not defined in refined class. But if the method is defined in refined class, it should keep refined method and remove original method. Patch by Seiei Higa. [ruby-core:67722] [Bug #10765] * class.c (method_entry_i, class_instance_method_list, rb_obj_singleton_methods): should not include methods of superclasses if recur is false. [ruby-dev:48854] [Bug #10826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r--method.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/method.h b/method.h
index f2f519679e..7d03b99c96 100644
--- a/method.h
+++ b/method.h
@@ -106,6 +106,9 @@ struct unlinked_method_entry_list_entry {
};
#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
+#define UNDEFINED_REFINED_METHOD_P(def) \
+ ((def)->type == VM_METHOD_TYPE_REFINED && \
+ UNDEFINED_METHOD_ENTRY_P((def)->body.orig_me))
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex);
rb_method_entry_t *rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_flag_t noex);