aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_env.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-20 15:06:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-20 15:06:56 +0000
commitabe75149d14d3286d3051c9e961ab6473a243a19 (patch)
treef33ad9fcd4569f51d7f0b85fefb751597211438d /test/ruby/test_env.rb
parente76eebd79be9fa3cb59d0ea6e4ce8214cc6e56ad (diff)
downloadruby-abe75149d14d3286d3051c9e961ab6473a243a19.tar.gz
Enumerable#to_h with block and so on
[Feature #15143] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_env.rb')
-rw-r--r--test/ruby/test_env.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index b9b8fc8b04..54a0270967 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -399,6 +399,8 @@ class TestEnv < Test::Unit::TestCase
def test_to_h
assert_equal(ENV.to_hash, ENV.to_h)
+ assert_equal(ENV.map {|k, v| ["$#{k}", v.size]}.to_h,
+ ENV.to_h {|k, v| ["$#{k}", v.size]})
end
def test_reject