aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index 3f27a0c633..d349a375c6 100644
--- a/hash.c
+++ b/hash.c
@@ -994,7 +994,7 @@ static int
each_pair_i(VALUE key, VALUE value)
{
if (key == Qundef) return ST_CONTINUE;
- rb_yield(rb_assoc_new(key, value));
+ rb_yield_values(2, key, value);
return ST_CONTINUE;
}
@@ -1027,7 +1027,7 @@ static int
each_i(VALUE key, VALUE value)
{
if (key == Qundef) return ST_CONTINUE;
- rb_yield_values(2, key, value);
+ rb_yield(rb_assoc_new(key, value));
return ST_CONTINUE;
}