diff options
Diffstat (limited to 'test/ruby/test_fixnum.rb')
-rw-r--r-- | test/ruby/test_fixnum.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_fixnum.rb b/test/ruby/test_fixnum.rb index 95a273bb94..a031923b02 100644 --- a/test/ruby/test_fixnum.rb +++ b/test/ruby/test_fixnum.rb @@ -271,4 +271,8 @@ class TestFixnum < Test::Unit::TestCase def test_xor_with_nonintegral_numeric assert_raise(TypeError, "#1792") { 1 ^ DummyNumeric.new } end + + def test_singleton_method + assert_raise(TypeError) { a = 1; def a.foo; end } + end end |