Str.each_line("")

each_line [email protected]$j$H$7$F6uJ8;zNs$rM?$($k$N$O%Q%i%0%i%U%b!<%Ie(B
e$B$H$$$&$d$D$GJ#?t$NO"[email protected][email protected]$C$?$H;W$&e(B
e$B$N$G$9$,!"[email protected]$i$l$F$7$^$$$^$9!#e(B

% ./ruby -ve ‘“a\nb\n\nc\nd\n”.each_line("") {|x| p x }’
ruby 1.9.0 (2008-05-02 revision 16277) [i686-linux]
“a\n”
“b\n\n”
“c\n”
“d\n”

1.8 [email protected]$i$l$^$;$s!#e(B

% ruby-1.8 -ve ‘“a\nb\n\nc\nd\n”.each_line("") {|x| p x }’
ruby 1.8.7 (2008-05-02 patchlevel 5000) [i686-linux]
“a\nb\n\n”
“c\nd\n”

[email protected]!“e(Beach_line e$B$Ne(B rdoc e$B$Oe(B 1.8.2
e$B$+$i$”$j$^$9$,!“e(B1.9 e$B$N$h$&e(B
e$B$J5sF0$,=q$$$F$”$j$^$9!#$7$+$7$3$l$Oe(B 1.8 e$B$N5sF0$H$O0lCW$7$^e(B
e$B$;$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