From 669e9ac5ff2593b175bd6b0b30d482d3e2fbced3 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 22 Feb 2014 05:05:22 +0000 Subject: merge revision(s) 44931: [Backport #9452] * vm_insnhelper.c (vm_call_method): should check ci->me->flag of a refining method in case the method is private. [ruby-core:60111] [Bug #9452] * vm_method.c (make_method_entry_refined): set me->flag of a refined method entry to NOEX_PUBLIC in case the original method is private and it is refined as a public method. The original flag is stored in me->def->body.orig_me, so it's OK to make a refined method entry public. [ruby-core:60111] [Bug #9452] * test/ruby/test_refinement.rb: related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_method.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vm_method.c') diff --git a/vm_method.c b/vm_method.c index fce8add6ef..ecded4aa2f 100644 --- a/vm_method.c +++ b/vm_method.c @@ -212,6 +212,7 @@ make_method_entry_refined(rb_method_entry_t *me) *new_def->body.orig_me = *me; rb_vm_check_redefinition_opt_method(me, me->klass); if (me->def) me->def->alias_count++; + me->flag = NOEX_WITH_SAFE(NOEX_PUBLIC); me->def = new_def; } -- cgit v1.2.3