diff options
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 9db30ee39c..1239711756 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1165,6 +1165,14 @@ class TestModule < Test::Unit::TestCase assert_equal(1, c.x, bug3406) end + def test_attr_writer_with_no_arguments + bug8540 = "[ruby-core:55543]" + c = Class.new do + attr_writer :foo + end + assert_raise(ArgumentError) { c.new.send :foo= } + end + def test_private_constant c = Class.new c.const_set(:FOO, "foo") |