ruby-changes:17573
From: nobu <ko1@a...>
Date: Sun, 24 Oct 2010 14:16:40 +0900 (JST)
Subject: [ruby-changes:17573] Ruby:r29578 (trunk): * vm.c (vm_define_method): defined method is run with the default
nobu 2010-10-24 14:11:26 +0900 (Sun, 24 Oct 2010) New Revision: 29578 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29578 Log: * vm.c (vm_define_method): defined method is run with the default public visibility regardless the visibility context of definition. [ruby-core:30638] Modified files: trunk/ChangeLog trunk/test/ruby/test_module.rb trunk/vm.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29577) +++ ChangeLog (revision 29578) @@ -1,3 +1,9 @@ +Sun Oct 24 14:11:16 2010 Nobuyoshi Nakada <nobu@r...> + + * vm.c (vm_define_method): defined method is run with the default + public visibility regardless the visibility context of definition. + [ruby-core:30638] + Sun Oct 24 12:08:54 2010 Aaron Patterson <aaron@t...> * lib/test/unit.rb: make test/unit play nicely with the rake test Index: vm.c =================================================================== --- vm.c (revision 29577) +++ vm.c (revision 29578) @@ -1868,6 +1868,7 @@ /* dup */ COPY_CREF(miseq->cref_stack, cref); + miseq->cref_stack->nd_visi = NOEX_PUBLIC; miseq->klass = klass; miseq->defined_method_id = id; rb_add_method(klass, id, VM_METHOD_TYPE_ISEQ, miseq, noex); Index: test/ruby/test_module.rb =================================================================== --- test/ruby/test_module.rb (revision 29577) +++ test/ruby/test_module.rb (revision 29578) @@ -929,7 +929,6 @@ def test_attr_inherited_visibility bug3406 = '[ruby-core:30638]' - skip(bug3406) c = Class.new do class << self private -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/