Issue #5991 has been reported by Nobuyoshi Nakada.

----------------------------------------
Bug #5991: fiddle/conversion.c ignores unsigned qualifier
https://bugs.ruby-lang.org/issues/5991

Author: Nobuyoshi Nakada
Status: Assigned
Priority: Normal
Assignee: Aaron Patterson
Category: ext
Target version: 2.0.0
ruby -v: r34519


In value_to_generic(), signed_p seems to be ignored except for
TYPE_LONG, and NUM2LONG() is used even if signed_p is not set.
NUM2INT() and NUM2UINT() have different value ranges, so I
think they should be separated.

And in generic_to_value(), signed_p is ignored only for
TYPE_LONG_LONG, and I can't see any reason to make the
diffrence.

Patch is attached.


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