diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-24 05:11:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-24 05:11:26 +0000 |
commit | 98ac9b866747306edd7cd9437d74c7af51a3a9da (patch) | |
tree | 224ac19b0ad7950d8975aa9d0c08ab59eb5aaadc | |
parent | 8a40d614a3aca6e1ef0c2fec439bf6661466f282 (diff) |
* vm.c (vm_define_method): defined method is run with the default
public visibility regardless the visibility context of definition.
[ruby-core:30638]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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); |