* string.c (rb_str_rstrip_bang): wrong strip point. [ruby-dev:31652]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4461bd2f1f
commit
9166bd2bc9
@ -1,3 +1,7 @@
|
|||||||
|
Mon Aug 27 23:14:02 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* string.c (rb_str_rstrip_bang): wrong strip point. [ruby-dev:31652]
|
||||||
|
|
||||||
Mon Aug 27 22:39:08 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Mon Aug 27 22:39:08 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* encoding.c (rb_enc_codelen): raises invalid sequence exception
|
* encoding.c (rb_enc_codelen): raises invalid sequence exception
|
||||||
|
4
string.c
4
string.c
@ -4260,9 +4260,9 @@ rb_str_rstrip_bang(VALUE str)
|
|||||||
|
|
||||||
rb_str_modify(str);
|
rb_str_modify(str);
|
||||||
enc = rb_enc_get(str);
|
enc = rb_enc_get(str);
|
||||||
s = t = RSTRING_PTR(str);
|
s = RSTRING_PTR(str);
|
||||||
if (!s || RSTRING_LEN(str) == 0) return Qnil;
|
if (!s || RSTRING_LEN(str) == 0) return Qnil;
|
||||||
e = RSTRING_END(str);
|
t = e = RSTRING_END(str);
|
||||||
while (s < e) {
|
while (s < e) {
|
||||||
int cc = rb_enc_codepoint(s, e, enc);
|
int cc = rb_enc_codepoint(s, e, enc);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user