From fa4e516db95cb6a158ebb162688efbc17ff997a1 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 17 Nov 2015 09:42:39 +0000 Subject: * method.h: introduce rb_method_definition_t::complemented_count. * vm_method.c (method_definition_addref_complement): introduced. def->alias_count is used to decide warn or do not warn at method redefinition. Complented methods should not prevent redefiniton warnings. * vm_method.c (rb_method_definition_release): release def iff alias_count == 0 && complemented_count == 0. * test/ruby/test_module.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- method.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'method.h') diff --git a/method.h b/method.h index d36cf38297..f069202c64 100644 --- a/method.h +++ b/method.h @@ -143,8 +143,9 @@ typedef struct rb_method_refined_struct { } rb_method_refined_t; typedef struct rb_method_definition_struct { - rb_method_type_t type; /* method type */ - int alias_count; + rb_method_type_t type : 8; /* method type */ + int alias_count : 28; + int complemented_count: 28; union { rb_method_iseq_t iseq; -- cgit v1.2.3