String.split is broken
----------------------
Key: JRUBY-3757
URL: http://jira.codehaus.org/browse/JRUBY-3757
Project: JRuby
Issue Type: Bug
Components: Ruby 1.9
Affects Versions: JRuby 1.3
Environment: Linux 2.6.18 (Centos 5.3), jruby 1.3.0 (ruby 1.8.6p287)
(2009-06-03 5dc2e22) (OpenJDK 64-Bit Server VM 1.6.0) [amd64-java]
Reporter: Thomas Rasch
Assignee: Thomas E Enebo
String.split produces a deeply nested array when splitting at newlines:
---
require 'pp'
somestring = <<END
a b c d
e f g h
END
lines = somestring.split("\n")
pp lines
---
With JRuby 1.8:
# jruby test.rb
["a b c d", "e f g h"]
With JRuby 1.9:
# jruby --1.9 test.rb
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["a b c
d"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],
["e f g h"]]
--
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