aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-24 06:57:20 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-24 06:57:20 +0000
commit9ae270bf8880d1e4e950556216e4db3150bd9b8b (patch)
tree1380be5db7c78806f87ca2054104302f35e7d537 /test/ruby/test_class.rb
parentd42794b78e769dacb2796a3c9ce6ae4c73dd9089 (diff)
downloadruby-9ae270bf8880d1e4e950556216e4db3150bd9b8b.tar.gz
Fix r36805.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index f20719f2d7..8b2328e289 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -187,7 +187,12 @@ class TestClass < Test::Unit::TestCase
def test_singleton_class
assert_raise(TypeError) { 1.extend(Module.new) }
- assert_raise(TypeError) { 1.0.extend(Module.new) }
+ if 1.0.equal? 1.0 # flonum?
+ assert_raise(TypeError) { 1.0.extend(Module.new) }
+ else
+ assert_nothing_raised { 1.0.extend(Module.new) }
+ end
+ assert_nothing_raised { (2.0**1000).extend(Module.new) }
assert_raise(TypeError) { :foo.extend(Module.new) }
assert_in_out_err([], <<-INPUT, %w(:foo :foo true true), [])