String.each_line: Newline handling differs between 1.9 and 1.8 compatibility
mode
---------------------------------------------------------------------------------
Key: JRUBY-5641
URL: http://jira.codehaus.org/browse/JRUBY-5641
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules, Ruby 1.9.2
Affects Versions: JRuby 1.6
Reporter: Clemens Fuchslocher
With JRuby 1.6.0 and 1.9 compatibility mode, successive newlines are grouped
together in a mystical way:
{noformat}
$ jruby --1.9 --version
jruby 1.6.0 (ruby 1.9.2 patchlevel 136) (2011-03-15 f3b6154) (Java HotSpot(TM)
Client VM 1.6.0_22) [linux-i386-java]
$ jruby --1.9 -e '"\n\n\n\n\n".each_line { |line| p line }'
"\n"
"\n\n\n"
"\n"
{noformat}
With JRuby 1.6.0 and 1.8 compatibility mode:
{noformat}
$ jruby --1.8 --version
jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java HotSpot(TM)
Client VM 1.6.0_22) [linux-i386-java]
$ jruby --1.8 -e '"\n\n\n\n\n".each_line { |line| p line }'
"\n"
"\n"
"\n"
"\n"
"\n"
{noformat}
With Ruby 1.9.2p180:
{noformat}
$ ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
$ ruby -e '"\n\n\n\n\n".each_line { |line| p line }'
"\n"
"\n"
"\n"
"\n"
"\n"
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email