summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-11 11:01:21 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-11 11:01:21 +0000
commit6f26607b68b0bef59e1592397e37e9c14644375b (patch)
tree91d69e9e683d542eb0764ce2a6b5fb2c5d2e7fe9 /ext
parentc06f7b5b2e5a599e4cbc01a606ba4da75f892f78 (diff)
merges r20150 from trunk into ruby_1_9_1.
* ext/stringio/stringio.c (strio_ungetc): ungetc position should not be changed from 1.8. [ruby-core:19632] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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 191c1024c4..4c997dcd04 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -721,7 +721,7 @@ strio_ungetc(VALUE self, VALUE c)
}
}
/* get logical position */
- lpos = 0; p = RSTRING_PTR(ptr->string); pend = p + ptr->pos - 1;
+ lpos = 0; p = RSTRING_PTR(ptr->string); pend = p + ptr->pos;
for (;;) {
clen = rb_enc_mbclen(p, pend, enc);
if (p+clen >= pend) break;