From 1e73d66f6b1f70f87e2745ed529e1840b03577dc Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 23 Aug 2012 11:51:30 +0000 Subject: * test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test. * test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto. * test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto. * test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_bignum.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby/test_bignum.rb') diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index d9e689ce48..a9193b9452 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -505,4 +505,9 @@ class TestBignum < Test::Unit::TestCase def o.coerce(x); [x, 2**100]; end assert_equal((2**200).to_f, (2**300).fdiv(o)) end + + def test_singleton_method + # this test assumes 32bit/64bit platform + assert_raise(TypeError) { a = 1 << 64; def a.foo; end } + end end -- cgit v1.2.3