rstripがstripしすぎる

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));

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message Re: [ruby-dev:31786] rstripe$B$,e(Bstripe$B$7$9$.$ke(B
on Sat, 15 Sep 2007 12:56:24 +0900, Kouhei S. [email protected]
writes:

|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

e$B$"!#%3%_%C%H$7$F$/[email protected]$5$$$^$;$s$+!)e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs