summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-15 09:26:06 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-15 09:26:06 +0000
commit740e1b66c8e42ef63bbf5043e349f80855cbec14 (patch)
tree5321af274bb1ce51989ed1a28a58aec2c909ba90 /string.c
parentfd7e89ddc2e6f3a5857d483ff9884a9e09c46124 (diff)
* 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
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index e20007f0b9..0a50f174fe 100644
--- a/string.c
+++ b/string.c
@@ -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));