1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.

[Feature #6276]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-04-24 03:46:55 +00:00
parent b05c95d93f
commit 770ddcdfe0
10 changed files with 156 additions and 2 deletions

View file

@ -327,6 +327,10 @@ class TestEnv < Test::Unit::TestCase
assert_equal(h, ENV.to_hash)
end
def test_to_h
assert_equal(ENV.to_hash, ENV.to_h)
end
def test_reject
h1 = {}
ENV.each_pair {|k, v| h1[k] = v }