From a46eacb213bbf001f688dc8f00cf85ea1b8a6281 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Wed, 8 May 2013 11:58:46 +0900 Subject: Move Hash#values_at to mruby-hash-ext gem. --- src/hash.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/hash.c') diff --git a/src/hash.c b/src/hash.c index da5f49b02..566d423a9 100644 --- a/src/hash.c +++ b/src/hash.c @@ -610,29 +610,6 @@ mrb_hash_shift(mrb_state *mrb, mrb_value hash) * */ -/* - * call-seq: - * hsh.values_at(key, ...) -> array - * - * Return an array containing the values associated with the given keys. - * Also see Hash.select. - * - * h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" } - * h.values_at("cow", "cat") #=> ["bovine", "feline"] - */ - -mrb_value -mrb_hash_values_at(mrb_state *mrb, int argc, mrb_value *argv, mrb_value hash) -{ - mrb_value result = mrb_ary_new_capa(mrb, argc); - long i; - - for (i=0; i a_hash -- cgit v1.2.3