diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 07:56:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 07:56:23 +0000 |
commit | d65d2384a6ef555f0eb10c65def1198f01e17e4b (patch) | |
tree | faab72947e9ae9ab6064fae178b1fbd082dd0e07 /test/ruby | |
parent | 99058e83be0849cf2995d60da10e4d19adbc1349 (diff) | |
download | ruby-d65d2384a6ef555f0eb10c65def1198f01e17e4b.tar.gz |
* test/ruby/test_module.rb (test_attr_inherited_visibility): see [ruby-core:30638].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_module.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 77598e957f..23c944f4bb 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -926,4 +926,17 @@ class TestModule < Test::Unit::TestCase e = assert_raise(NameError) {eval("Bug3123", TOPLEVEL_BINDING)} assert_not_match(/Object::/, e.message, bug3123) end + + def test_attr_inherited_visibility + c = Class.new do + class << self + private + def attr_accessor(*); super; end + end + attr_accessor :x + end.new + bug3406 = '[ruby-core:30638]' + assert_nothing_raised(bug3406) {c.x = 1} + assert_equal(1, c.x, bug3406) + end end |