summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-24 05:11:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-24 05:11:26 +0000
commit98ac9b866747306edd7cd9437d74c7af51a3a9da (patch)
tree224ac19b0ad7950d8975aa9d0c08ab59eb5aaadc
parent8a40d614a3aca6e1ef0c2fec439bf6661466f282 (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--ChangeLog6
-rw-r--r--test/ruby/test_module.rb1
-rw-r--r--vm.c1
3 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d4a63c020..c5a581c7ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/vm.c b/vm.c
index 084c30964a..9137a4dc3a 100644
--- a/vm.c
+++ b/vm.c
@@ -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);