StringIO#each_line should support a separator argument
------------------------------------------------------

                 Key: JRUBY-1935
                 URL: http://jira.codehaus.org/browse/JRUBY-1935
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC1
         Environment: Latest JRuby 1.1RC1 from trunk
            Reporter: Vladimir Sizikov
         Attachments: stringio-each-line-with-separator.patch

Consider the following example:
{noformat}
require 'stringio'
s = StringIO.new("a b c d")
s.each_line(" ") { |line| p line }
{noformat}

MRI prints:
"a "
"b "
"c "
"d"

JRuby:
ArgumentError: wrong number of arguments (1 for 0)

This also leads to a rubyspec failure.

The proposed patch fixes the problem and the spec failure.


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

Reply via email to