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:
parent
b05c95d93f
commit
770ddcdfe0
10 changed files with 156 additions and 2 deletions
|
@ -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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue