diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-15 11:44:05 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-15 11:44:05 +0000 |
commit | c2a3a47f40c5884a2f867ae90b1d2fb8172e3925 (patch) | |
tree | 906a9293cdd517b72b5619fba66ebe2c7b475e76 /string.c | |
parent | 33ed9f92bae61171cd7e9db262efff353e8cbe33 (diff) |
merges r29254 from trunk into ruby_1_9_2.
--
* 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/branches/ruby_1_9_2@29797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1224,12 +1224,13 @@ rb_str_times(VALUE str, VALUE times) * * Format---Uses <i>str</i> as a format specification, and returns the result * of applying it to <i>arg</i>. If the format specification contains more than - * one substitution, then <i>arg</i> must be an <code>Array</code> containing - * the values to be substituted. See <code>Kernel::sprintf</code> for details - * of the format string. + * one substitution, then <i>arg</i> must be an <code>Array</code> or <code>Hash</code> + * containing the values to be substituted. See <code>Kernel::sprintf</code> for + * details of the format string. * * "%05d" % 123 #=> "00123" * "%-5s: %08x" % [ "ID", self.object_id ] #=> "ID : 200e14d6" + * "foo = %{foo}" % { :foo => 'bar' } #=> "foo = bar" */ static VALUE |