Issue #2709 has been updated by Patrik Wenger.


> Can you be a bit more verbose here?  Please illustrate a tiny example where ignoring sprintf argumens is powerful.

At our company we have a framework to execute commands in telnet sessions on many hosts in parallel.
This framework is used in many scripts. Depending on the scripts, the needs for log files are different.
Some scripts write one log file per host and append to it in a second run.
Other scripts write one log file per telnet session, so the name of the host and some date/time integers are involved.

And that's exactly what the framework provides to the freely configurable log file format string:
hostname, year, month, day, hour, minute, second

The former scripts could then use a log path like this:
"~/log/%s"

The latter one something like this (a directory each day, a file per host and session):
"/path/to/session/logs/%2$i-%3$02i-%4$02i/%1$s_%5$02i%6$02i%7$02i"

I think this is power of Ruby. And it shouldn't be prohibited, just because one is debugging.
It wouldn't change the default behavior ($DEBUG and $VERBOSE are false) anyway. :-)
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2709

----------------------------------------
http://redmine.ruby-lang.org