Project

General

Profile

Actions

Bug #3574

closed

Missing documentation for sprintf named argument support

Added by phasis68 (Heesob Park) over 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.3dev (2010-07-15 trunk 28645) [i386-mswin32_90]
Backport:
[ruby-core:31294]

Description

=begin
I noticed that sprintf supports named argument since 1.9.1.

But I cannot find any documentation about sprintf named argument support.

In my test, named argument works like this:

sprintf("%s %d %{first} %{second}",{:first=>'hello',:second=>8}) #=> "hello 8 hello 8"

Thanks.
=end


Related issues

Related to Ruby master - Feature #442: name referencing in sprintfClosedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF