Bug #3574

Missing documentation for sprintf named argument support

Added by Heesob Park over 5 years ago. Updated over 4 years ago.

ruby -v:ruby 1.9.3dev (2010-07-15 trunk 28645) [i386-mswin32_90] Backport:


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"


Related issues

Related to Ruby trunk - Feature #442: name referencing in sprintf Closed


#1 Updated by Yui NARUSE over 5 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r28702.
Heesob, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Also available in: Atom PDF