[macruby-changes] [5172] MacRuby/trunk/sprintf.c
source_changes at macosforge.org
source_changes at macosforge.org
Sat Jan 15 09:39:39 PST 2011
Revision: 5172
http://trac.macosforge.org/projects/ruby/changeset/5172
Author: watson1978 at gmail.com
Date: 2011-01-15 09:39:35 -0800 (Sat, 15 Jan 2011)
Log Message:
-----------
Fixed the bug of sprintf. "#" flag should be ignored with "dDiuU" format.
Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
assert_equal("-0000123", sprintf("%#+08u", -123))
assert_equal("-0000123", sprintf("%#+08d", -123))
assert_equal("-0000123", sprintf("%#+08i", -123))
puts :ok
}}}
Modified Paths:
--------------
MacRuby/trunk/sprintf.c
Modified: MacRuby/trunk/sprintf.c
===================================================================
--- MacRuby/trunk/sprintf.c 2011-01-15 16:52:17 UTC (rev 5171)
+++ MacRuby/trunk/sprintf.c 2011-01-15 17:39:35 UTC (rev 5172)
@@ -625,6 +625,7 @@
case 'U':
base = 10;
complete = true;
+ sharp_flag = false;
break;
case 'x':
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110115/4eb9a296/attachment.html>
More information about the macruby-changes
mailing list