e$B?\F#$G$9!#e(B
e$BESCf$K6uGr$O$"$k$,!":G8e$O6uGr$G=*$o$C$F$$$J$$J8;zNs$rEO$9$H!"e(B
rstripe$B$,I,MW0J>e$Ke(Bstripe$B$7$^$9!#e(B
% /tmp/local/bin/ruby -v -e ‘p “a b”.rstrip’
ruby 1.9.0 (2007-09-14 patchlevel 0) [x86_64-linux]
“a”
Index: string.c
— string.c (e$B%j%S%8%g%se(B 13445)
+++ string.c (e$B:n6H%3%T!<e(B)
@@ -4373,6 +4373,7 @@
}
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));