diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | test/ruby/test_module.rb | 1 | ||||
-rw-r--r-- | vm.c | 1 |
3 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sun Oct 24 14:11:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@tenderlovemaking.com> * lib/test/unit.rb: make test/unit play nicely with the rake test diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 0e4737dea6..e5f1e69749 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -929,7 +929,6 @@ class TestModule < Test::Unit::TestCase def test_attr_inherited_visibility bug3406 = '[ruby-core:30638]' - skip(bug3406) c = Class.new do class << self private @@ -1868,6 +1868,7 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval, /* 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); |