summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 00:20:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 00:20:45 +0000
commit97e21517a3c79b9b144b7160afd545c283815413 (patch)
tree33343f1f486c1d1e1c3973a09756ce6c6c5affb7 /enumerator.c
parent9f21759c53934597aa2db6a68fffc2edd662b3ed (diff)
* internal.h: define struct MEMO.
* enum.c: use MEMO. * enumerator.c: ditto. * load.c: ditto. * node.h: return (struct MEMO *) pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/enumerator.c b/enumerator.c
index 4d989c3..433bd60 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -494,9 +494,9 @@ enumerator_each(int argc, VALUE *argv, VALUE obj)
static VALUE
enumerator_with_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
{
- NODE *memo = (NODE *)m;
- VALUE idx = memo->u1.value;
- memo->u1.value = rb_int_succ(idx);
+ struct MEMO *memo = (struct MEMO *)m;
+ VALUE idx = memo->v1;
+ memo->v1 = rb_int_succ(idx);
if (argc <= 1)
return rb_yield_values(2, val, idx);