diff options
author | nagachika <nagachika@ruby-lang.org> | 2020-09-29 20:33:06 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2020-09-29 20:33:06 +0900 |
commit | 665589cbdf7bf652067113dd1c0bc49012b990e0 (patch) | |
tree | 35912b7727af5e16a539ee6b763dabb0ad15bb19 /test | |
parent | c10326d913a0340fc78ec94dc09d9e9398b31f1c (diff) |
merge revision(s) df14c758fc705c49c2aaf4c9276a8f7229438fbf: [Backport #17181]
Make hash returned by Hash#transform_values not have a default
This sets an explicit default of nil. There is probably a better
approach of removing the default.
Fixes [Bug #17181]
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_hash.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 738b058ca1..046ea40f5d 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -1673,6 +1673,7 @@ class TestHash < Test::Unit::TestCase x.default_proc = proc {|h, k| k} y = x.transform_values {|v| v ** 2 } assert_nil(y.default_proc) + assert_nil(y.default) y = x.transform_values.with_index {|v, i| "#{v}.#{i}" } assert_equal(%w(1.0 2.1 3.2), y.values_at(:a, :b, :c)) |