summaryrefslogtreecommitdiff
path: root/ext/stringio/stringio.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/stringio/stringio.c')
-rw-r--r--ext/stringio/stringio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 01309decc9..357e4f12c1 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1095,8 +1095,8 @@ strio_each_codepoint(VALUE self)
c = rb_enc_codepoint_len(RSTRING_PTR(ptr->string)+ptr->pos,
RSTRING_END(ptr->string), &n, enc);
- rb_yield(UINT2NUM(c));
ptr->pos += n;
+ rb_yield(UINT2NUM(c));
}
return self;
}