mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add test(requires MRB_GC_FIXED_ARENA enabled)
This commit is contained in:
@@ -21,4 +21,9 @@ end
|
||||
assert('Hash#values_at') do
|
||||
h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
|
||||
assert_equal ["bovine", "feline"], h.values_at("cow", "cat")
|
||||
|
||||
keys = []
|
||||
(0...1000).each { |v| keys.push "#{v}" }
|
||||
h = Hash.new { |hash,k| hash[k] = k }
|
||||
assert_equal keys, h.values_at(*keys)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user