summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-20 05:55:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-20 05:55:38 +0000
commit5a1e96b22aa6759bde56ff9667759b44e9f6fa28 (patch)
tree956063703940ef9f3d450768628584dc08f97c42 /hash.c
parent4c97b921f2f6d71d7a3f2c0b2c0c089b15686973 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/hash.c b/hash.c
index 2569b42..e1f5939 100644
--- a/hash.c
+++ b/hash.c
@@ -526,14 +526,11 @@ hash_each_key(hash)
}
static int
-each_pair_i(key, value, rev)
+each_pair_i(key, value)
VALUE key, value;
{
if (key == Qnil) return ST_CONTINUE;
- if (rev)
- rb_yield(assoc_new(value, key));
- else
- rb_yield(assoc_new(key, value));
+ rb_yield(assoc_new(key, value));
return ST_CONTINUE;
}
@@ -545,14 +542,6 @@ hash_each_pair(hash)
return hash;
}
-static VALUE
-hash_each_with_index(hash)
- VALUE hash;
-{
- hash_foreach(hash, each_pair_i, 1);
- return hash;
-}
-
static int
to_a_i(key, value, ary)
VALUE key, value, ary;
@@ -1149,7 +1138,6 @@ Init_Hash()
rb_define_method(cHash,"each_value", hash_each_value, 0);
rb_define_method(cHash,"each_key", hash_each_key, 0);
rb_define_method(cHash,"each_pair", hash_each_pair, 0);
- rb_define_method(cHash,"each_with_index", hash_each_with_index, 0);
rb_define_method(cHash,"keys", hash_keys, 0);
rb_define_method(cHash,"values", hash_values, 0);