diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-04 18:57:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-04 18:57:31 +0900 |
| commit | 172060877a80d5f1c5bd725dafd041c7180e9a28 (patch) | |
| tree | 510311b176210a88a1ab7dc7a59b785e556af38a /mrbgems/mruby-hash-ext/test/hash.rb | |
| parent | 8a9e2066c3124f6bcd65d724bd519265a7d6ebe9 (diff) | |
| download | mruby-172060877a80d5f1c5bd725dafd041c7180e9a28.tar.gz mruby-172060877a80d5f1c5bd725dafd041c7180e9a28.zip | |
add Hash#to_h; ref #2348
Diffstat (limited to 'mrbgems/mruby-hash-ext/test/hash.rb')
| -rw-r--r-- | mrbgems/mruby-hash-ext/test/hash.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mrbgems/mruby-hash-ext/test/hash.rb b/mrbgems/mruby-hash-ext/test/hash.rb index 62cfc8856..2bc5b911a 100644 --- a/mrbgems/mruby-hash-ext/test/hash.rb +++ b/mrbgems/mruby-hash-ext/test/hash.rb @@ -115,3 +115,9 @@ assert("Hash#key") do assert_nil h.key('nil') assert_equal 'nil', h.key(nil) end + +assert("Hash#to_h") do + h = { "a" => 100, "b" => 200 } + assert_equal Hash, h.to_h.class + assert_equal h, h.to_h +end |
