summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-14 22:27:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-14 22:27:54 +0000
commit757f5bcb971d2fa1edeaccce0f4fd877c12b0b6d (patch)
treec8ccaaa97a75a5df0a6b5f6e71039a69dddb9b26 /sprintf.c
parentf84f1644138d20263f0939606dc8fc4f83fcc29f (diff)
* string.c (rb_str_times): mentioned about Hash argument. a patch
from Daniel Bovensiepen at [ruby-core:32386]. * sprintf.c (get_hash): ditto, and fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sprintf.c b/sprintf.c
index 4f3b51701e..a9e560b48e 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -422,13 +422,13 @@ get_hash(volatile VALUE *hash, int argc, const VALUE *argv)
* sprintf("%u", -123) #=> "-123"
*
* For more complex formatting, Ruby supports a reference by name.
- * %<name>s style uses format style, but ${name} style doesn't.
+ * %<name>s style uses format style, but %{name} style doesn't.
*
* Exapmles:
* sprintf("%<foo>d : %<bar>f" % { :foo => 1, :bar => 2 })
* #=> 1 : 2.000000
- * sprintf("%d %{foo}" % { :foo => 'bar' })
- * # => "%d bar"
+ * sprintf("%{foo}f" % { :foo => 1 })
+ * # => "1f"
*/
VALUE