From c181d89c9dca0e722a525b871a82cbd75c59bb80 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 21 Apr 2020 13:14:10 +0900 Subject: `Kernel#clone` and `Kernel#dup` no longer raise `TypeError`; fix #4974 In ISO, those methods should raise `TypeError`, but the spec has been changed. The change was discussed in [Feature#12979]. --- test/t/kernel.rb | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'test/t/kernel.rb') diff --git a/test/t/kernel.rb b/test/t/kernel.rb index c2eeee1a5..aac6373fa 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -197,17 +197,6 @@ assert('Kernel#dup', '15.3.1.3.9') do a.set(2) c = a.dup - immutables = [ 1, :foo, true, false, nil ] - error_count = 0 - immutables.each do |i| - begin - i.dup - rescue TypeError - error_count += 1 - end - end - - assert_equal immutables.size, error_count assert_equal 2, a.get assert_equal 1, b.get assert_equal 2, c.get -- cgit v1.2.3