From: Yuki Sonoda Date: 2011-05-31T11:51:15+09:00 Subject: [ruby-core:36620] [Backport92 - Backport #3962][Closed] Wrong value of sprintf("%020a",1) Issue #3962 has been updated by Yuki Sonoda. Tracker changed from Bug to Backport Status changed from Assigned to Closed ---------------------------------------- Backport #3962: Wrong value of sprintf("%020a",1) http://redmine.ruby-lang.org/issues/3962 Author: Heesob Park Status: Closed Priority: Normal Assignee: Yuki Sonoda Category: Target version: ruby -v: ruby 1.9.3dev (2010-10-17 trunk 29520) [i386-mswin32_90] =begin The current trunk version works like this: C:\>ruby -e 'p sprintf("%020a",1)' "000000000000000x1p+0" C:\>ruby -e 'p sprintf("%020a",-1)' "-00000000000000x1p+0" As I tested the same C code with gcc 4.3.3, the correct result should be "0x000000000000001p+0" and "-0x000000000000x1p+0" =end -- http://redmine.ruby-lang.org