Array#pack with "U" pattern is broken with values bigger than 65536
-------------------------------------------------------------------
Key: JRUBY-1789
URL: http://jira.codehaus.org/browse/JRUBY-1789
Project: JRuby
Issue Type: Bug
Environment: Latest JRuby 1.1b1
Reporter: Vladimir Sizikov
Assignee: Thomas E Enebo
Attachments: array_pack_with_U.patch
Consider the following example:
{noformat}
[2**16].pack("U")
{noformat}
MRI prints:
"\360\220\200\200"
JRuby prints:
"\000"
Basically, all results for values bigger than 2**16 are incorrect.
The proposed patch (with regression tests) fixes the problem.
New join stuff was used for conversion, thanks to Marcin for discussion. :)
--
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