String conversions with 0dNNN and 0oNNN formats are incorrect
-------------------------------------------------------------

                 Key: JRUBY-1733
                 URL: http://jira.codehaus.org/browse/JRUBY-1733
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.x
         Environment: Latest JRuby 1.1b1 from trunk
            Reporter: Vladimir Sizikov
         Attachments: 0dnnn-and-0onnn-string-convers.patch, string_oct.rb

Consider the following examples:

{noformat}
puts "0d500".oct
puts "0o7".oct
puts "0d11".oct
puts "0d500".to_i
{noformat}

MRI prints:
500
7
11
500

JRuby prints:
0
0
0
0

:)

This also leads to three rubinius spec failures.

Attached patch (and unit tests) fixes the problem and 3 spec test failures.

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