diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-27 11:07:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-27 11:07:27 +0000 |
commit | 70d8e6cf22515bfbf15bd283726ce9b72730164d (patch) | |
tree | fbc1375813f6d86c2543a2f2c9bb0589306d6207 /test/ruby | |
parent | 673a6ad970c5d36dd084d77a0018aa2b690a0dd3 (diff) | |
download | ruby-70d8e6cf22515bfbf15bd283726ce9b72730164d.tar.gz |
object.c: no TypeError at special const dup
* object.c (rb_obj_dup): no longer raise a TypeError for special
constants, and return itself instead. [Feature#12979]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_object.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 7b3defa011..2f80bc6ffb 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -19,9 +19,9 @@ class TestObject < Test::Unit::TestCase end def test_dup - assert_raise(TypeError) { 1.dup } - assert_raise(TypeError) { true.dup } - assert_raise(TypeError) { nil.dup } + assert_equal 1, 1.dup + assert_equal true, true.dup + assert_equal nil, nil.dup assert_raise(TypeError) do Object.new.instance_eval { initialize_copy(1) } |