Bugs item #4970, was opened at 2006-07-07 14:18 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4970&group_id=426 Category: Core Group: 1.8.4 Status: Open Resolution: None Priority: 3 Submitted By: Gregor Cramer (gcramer) Assigned to: Nobody (None) Summary: bug in printf Initial Comment: I tried on the command line: $ ruby -e 'printf("%u\n", -123)' ..4294967173 $ ruby -e 'printf("%u\n", -1234567890)' -3060399406 One of the results seems to be errornous (or both?). The documentation about field '%u' says: "Treat argument as an unsigned decimal number." In the first case signed integer -123 is converted to unsigned integer 4294967173 (32 bit). But I didn't expect the leading ".." (I am right?). In the second case Bignum -1234567890 is not treated as an unsigned decimal number. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4970&group_id=426