Project

General

Profile

Actions

Bug #3721

closed

Unsigned formats broken in 1.9.2's unpack

Bug #3721: Unsigned formats broken in 1.9.2's unpack

Added by Noxerus (D. G.) about 15 years ago. Updated over 14 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x64-mswin64_100]
Backport:
[ruby-core:31778]

Description

=begin
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.
=end

Actions

Also available in: PDF Atom