1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* string.c (rb_str_rstrip_bang): fixed too much rstrip. [ruby-dev:31786]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2007-09-15 09:26:06 +00:00
parent fd7e89ddc2
commit 740e1b66c8
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Sat Sep 15 18:25:15 2007 Kouhei Sutou <kou@cozmixng.org>
* string.c (rb_str_rstrip_bang): fixed too much rstrip. [ruby-dev:31786]
Sat Sep 15 17:32:10 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_initialize): set default encoding. [ruby-dev:31787]

View file

@ -4374,6 +4374,7 @@ rb_str_rstrip_bang(VALUE str)
}
s += rb_enc_codelen(cc, enc);
}
if (!space_seen) t = s;
if (t < e) {
rb_str_modify(str);
STR_SET_LEN(str, t-RSTRING_PTR(str));