String#% handles null bytes differently than the latest MRI
-----------------------------------------------------------

                 Key: JRUBY-1797
                 URL: http://jira.codehaus.org/browse/JRUBY-1797
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.x
         Environment: Latest JRuby 1.1b1
            Reporter: Vladimir Sizikov
         Attachments: string-modulo-with-zero-bytes.patch

{noformat}
p "%\0" % []
p "foo%\0" % []
{noformat}

In the *latest* official MRI 1.8.6 patchlevel 111, and in MRI 1.9, the handling 
of null byte was
changed a bit, and this issue is to bring JRuby in sync with the latest MRI.

(Previously, null bytes were not printed, now they are.)

In MRI, the example above prints:
 "%\000"
"foo%\000"

In JRuby, and in older MRIs:
"%"
"foo%"

This also leads to rubinius spec failures.

The proposed patch fixes the problem.

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