summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-23 14:55:39 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-23 14:55:39 +0000
commitd4f83d22618c5e140bc71e88928f7ad37784f08a (patch)
tree705ee8e2a97542b0b80bf25254dc77045dd5601e /sprintf.c
parentda8e083ba6d1095b536c5f618b381a984508b3e4 (diff)
downloadruby-d4f83d22618c5e140bc71e88928f7ad37784f08a.tar.gz
* sprintf.c: fix comment. [ruby-dev:33275]
* math.c: fix comment. [ruby-dev:33276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sprintf.c b/sprintf.c
index 3b5d38afa0..e5dd513296 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -221,12 +221,7 @@ sign_bits(int base, const char *p)
* s | Argument is a string to be substituted. If the format
* | sequence contains a precision, at most that many characters
* | will be copied.
- * u | Treat argument as an unsigned decimal number. Negative integers
- * | are displayed as a 32 bit two's complement plus one for the
- * | underlying architecture; that is, 2 ** 32 + n. However, since
- * | Ruby has no inherent limit on bits used to represent the
- * | integer, this value is preceded by two dots (..) in order to
- * | indicate a infinite number of leading sign bits.
+ * u | Identical to `d'.
* X | Convert argument as a hexadecimal number using uppercase
* | letters. Negative numbers will be displayed with two
* | leading periods (representing an infinite string of
@@ -243,7 +238,7 @@ sign_bits(int base, const char *p)
* sprintf("%1$*2$s %2$d %1$s", "hello", 8) #=> " hello 8 hello"
* sprintf("%1$*2$s %2$d", "hello", -8) #=> "hello -8"
* sprintf("%+g:% g:%-g", 1.23, 1.23, 1.23) #=> "+1.23: 1.23:1.23"
- * sprintf("%u", -123) #=> "..4294967173"
+ * sprintf("%u", -123) #=> "-123"
*/
VALUE