IO#readpartial doesn't honor maxlength parameter and always returns the whole 
buffer content
--------------------------------------------------------------------------------------------

                 Key: JRUBY-2636
                 URL: http://jira.codehaus.org/browse/JRUBY-2636
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1.2
         Environment: Latest JRuby
            Reporter: Vladimir Sizikov
            Assignee: Vladimir Sizikov
             Fix For: JRuby 1.1.3


jruby -e "rd, wr = IO.pipe; wr.write('blah'); rd.read(1); p 
rd.readpartial(1).length" #===> 3

but should really be 1, since we requested readpartial(1).

MRI behavior:
ruby -e "rd, wr = IO.pipe; wr.write('blah'); rd.read(1); p 
rd.readpartial(1).length" # ===> 1

Will fix.


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