diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 15:34:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 15:34:31 +0000 |
commit | 7f30d00b53bd5ce680c13f3bcd57e8e29039aaee (patch) | |
tree | 6ceef42f0bb8a863216d8fefc295f8a359796722 /test/ruby | |
parent | 7a480ae850182881b45a28d6dcce06e0d8417391 (diff) | |
download | ruby-7f30d00b53bd5ce680c13f3bcd57e8e29039aaee.tar.gz |
object.c: no TypeError at special const
* object.c (special_object_p): no longer raise a TypeError for
Integer and Float, and return itself instead. [Feature#12979]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_object.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index dbe7e442ba..c1721de39c 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -23,6 +23,8 @@ class TestObject < Test::Unit::TestCase assert_equal true, true.dup assert_equal nil, nil.dup assert_equal false, false.dup + x = 1 << 64; assert_equal x, x.dup + x = 1.72723e-77; assert_equal x, x.dup assert_raise(TypeError) do Object.new.instance_eval { initialize_copy(1) } @@ -49,6 +51,8 @@ class TestObject < Test::Unit::TestCase assert_equal true, true.clone assert_equal nil, nil.clone assert_equal false, false.clone + x = 1 << 64; assert_equal x, x.clone + x = 1.72723e-77; assert_equal x, x.clone assert_raise(ArgumentError) {1.clone(freeze: false)} assert_raise(ArgumentError) {true.clone(freeze: false)} assert_raise(ArgumentError) {nil.clone(freeze: false)} |