Bug #3721: Unsigned formats broken in 1.9.2's unpack
http://redmine.ruby-lang.org/issues/show/3721

Author: Daniel Gutmanas
Status: Open, Priority: Normal
ruby -v: ruby 1.9.2p0 (2010-08-18 revision 29036) [x64-mswin64_100]

When specifying the V format code, unpack should treat the four bytes as an unsigned long integer. As can be seen in the following example, it treats it as a signed integer instead:
"\xFF\xFF\xFF\xFF".unpack(?V) => [-1]
The same code worked properly in 1.9.1.

By the way, the same problem occurs for the N and L format codes.


----------------------------------------
http://redmine.ruby-lang.org