summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-03-16 23:32:55 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-03-16 23:38:26 +0900
commitd514ba8e17106c6d159c3902ac5456d6269731f8 (patch)
tree4a0be3434f9aeeea98f7f94f6d830a0d19a52377 /test/ruby
parent304538e6ff64b8daadde5456988fb9f82c6a4849 (diff)
`Proc` made by `Hash#to_proc` should be a lambda [Bug #12671]
Like `Symbol#to_proc` (f0b815dc670b61eba1daaa67a8613ac431d32b16)
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_hash.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index cc13e3f6a5..c0ec078403 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -1627,6 +1627,8 @@ class TestHash < Test::Unit::TestCase
}
assert_equal([10, 20, 30], [1, 2, 3].map(&h))
+
+ assert_equal(true, h.to_proc.lambda?)
end
def test_transform_keys