summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-05-08 16:25:40 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-05-08 16:25:40 +0900
commit8e45630896af83ad9ad938ef135f51cfe35f885e (patch)
tree464098db86772a557f860b8a5a7ec9aa421352a4 /src
parent595b1990bccb6f592d7cbf8f26424bda1c10210b (diff)
parentc80103e89a7ddcbaa7b5fc470358a4bcae327953 (diff)
downloadmruby-8e45630896af83ad9ad938ef135f51cfe35f885e.tar.gz
mruby-8e45630896af83ad9ad938ef135f51cfe35f885e.zip
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'src')
-rw-r--r--src/hash.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/src/hash.c b/src/hash.c
index da5f49b02..882dd3121 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -324,12 +324,6 @@ mrb_hash_aget(mrb_state *mrb, mrb_value self)
return mrb_hash_get(mrb, self, key);
}
-mrb_value
-mrb_hash_lookup(mrb_state *mrb, mrb_value hash, mrb_value key)
-{
- return mrb_hash_get(mrb, hash, key);
-}
-
/*
* call-seq:
* hsh.fetch(key [, default] ) -> obj
@@ -611,29 +605,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 <code>Hash.select</code>.
- *
- * 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<argc; i++) {
- mrb_ary_push(mrb, result, mrb_hash_get(mrb, hash, argv[i]));
- }
- return result;
-}
-
-/*
* call-seq:
* hsh.select {|key, value| block} -> a_hash
* hsh.select -> an_enumerator
@@ -813,69 +784,6 @@ mrb_hash_empty_p(mrb_state *mrb, mrb_value self)
return mrb_bool_value(empty_p);
}
-/* 15.2.13.4.11 */
-/*
- * call-seq:
- * hsh.each_value {| value | block } -> hsh
- * hsh.each_value -> an_enumerator
- *
- * Calls <i>block</i> once for each key in <i>hsh</i>, passing the
- * value as a parameter.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.each_value {|value| puts value }
- *
- * <em>produces:</em>
- *
- * 100
- * 200
- */
-
-/* 15.2.13.4.10 */
-/*
- * call-seq:
- * hsh.each_key {| key | block } -> hsh
- * hsh.each_key -> an_enumerator
- *
- * Calls <i>block</i> once for each key in <i>hsh</i>, passing the key
- * as a parameter.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.each_key {|key| puts key }
- *
- * <em>produces:</em>
- *
- * a
- * b
- */
-
-/* 15.2.13.4.9 */
-/*
- * call-seq:
- * hsh.each {| key, value | block } -> hsh
- * hsh.each_pair {| key, value | block } -> hsh
- * hsh.each -> an_enumerator
- * hsh.each_pair -> an_enumerator
- *
- * Calls <i>block</i> once for each key in <i>hsh</i>, passing the key-value
- * pair as parameters.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.each {|key, value| puts "#{key} is #{value}" }
- *
- * <em>produces:</em>
- *
- * a is 100
- * b is 200
- *
- */
-
static mrb_value
inspect_hash(mrb_state *mrb, mrb_value hash, int recur)
{