String#unpack with Q pattern is incorrect
-----------------------------------------
Key: JRUBY-1779
URL: http://jira.codehaus.org/browse/JRUBY-1779
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Environment: Latest JRuby 1.1b1
Reporter: Vladimir Sizikov
Attachments: string-unpack-Q.patch
String#unpack with 'Q' pattern in some cases returns more elements than MRI.
Consider the following example:
{noformat}
("\xFF" * 8).unpack('Q5')
{noformat}
MRI 1.8.6, MRI 1.9, on both Linux and Windows platofroms produces:
[18446744073709551615]
JRuby produces:
[18446744073709551615, nil, nil, nil, nil]
This also leads to one Rubinius spec failure.
The proposed patch (with regression tests) fixes the problem, and spec 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