summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 0ffae5ebfe..6d9c8113a9 100644
--- a/struct.c
+++ b/struct.c
@@ -346,7 +346,7 @@ rb_struct_each_pair(s)
rb_bug("non-initialized struct");
}
for (i=0; i<RSTRUCT(s)->len; i++) {
- rb_yield(rb_assoc_new(RARRAY(member)->ptr[i], RSTRUCT(s)->ptr[i]));
+ rb_yield_values(2, RARRAY(member)->ptr[i], RSTRUCT(s)->ptr[i]);
}
return s;
}