diff options
author | Yoann Lecuyer <[email protected]> | 2020-08-26 22:46:58 +0200 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-08-27 23:41:22 +0900 |
commit | b3c1c767ea64ce435c115cece5074274b7aefadc (patch) | |
tree | 03b1c4cfa9f426df1bac008556f96952afe3ce8a /ext | |
parent | 96d701f73780638ffd3c8fa91c43f33f1a207d65 (diff) |
[stringio] fix stringio codepoint enumerator off by one error
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3460
Diffstat (limited to 'ext')
-rw-r--r-- | ext/stringio/stringio.c | 2 |
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; } |