diff options
| author | Masaki Muranaka <[email protected]> | 2013-05-08 11:58:46 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2013-05-08 13:22:35 +0900 |
| commit | a46eacb213bbf001f688dc8f00cf85ea1b8a6281 (patch) | |
| tree | b6158eb0863a7341ee4c46f0152234568d79cdeb /mrbgems/mruby-hash-ext/test/hash.rb | |
| parent | 11e70f2191caecfe546f8a97baf284c1cfc25e00 (diff) | |
| download | mruby-a46eacb213bbf001f688dc8f00cf85ea1b8a6281.tar.gz mruby-a46eacb213bbf001f688dc8f00cf85ea1b8a6281.zip | |
Move Hash#values_at to mruby-hash-ext gem.
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 98eb313a4..73e12d8f2 100644 --- a/mrbgems/mruby-hash-ext/test/hash.rb +++ b/mrbgems/mruby-hash-ext/test/hash.rb @@ -18,3 +18,9 @@ assert('Hash#merge!') do 'xyz_key' => 'xyz_value' } end +assert('Hash#values_at') do + h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" } + result = h.values_at("cow", "cat") + + result == ["bovine", "feline"] +end |
