Hash#delete should return the deleted value; fix #4133

This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-10-12 08:25:54 +09:00
parent a690aef8d3
commit 82e00ce60f
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -82,12 +82,12 @@ assert('Hash#default_proc', '15.2.13.4.7') do
end
assert('Hash#delete', '15.2.13.4.8') do
a = { 'abc' => 'abc' }
b = { 'abc' => 'abc' }
a = { 'abc' => 'ABC' }
b = { 'abc' => 'ABC' }
b_tmp_1 = false
b_tmp_2 = false
a.delete('abc')
assert_equal 'ABC', a.delete('abc')
b.delete('abc') do |k|
b_tmp_1 = true
end