Hi,

all of these format specifiers are currently considered valid by Ruby
1.8 and 1.9:

Star precision before star width:
"%.**d" % [5, 10, 1] # => "     00001"

Precision before flags and width:
"%.5+05d" % 5 # => "+00005"
"%.5 5d" % 5 # => " 00005"

Overriding a star width with a numeric one: (star argument still gets
popped)
"%*1s" % [5, 1] # => "1"

Width before flags:
"%5+0d" % 1 # => "+0001"
"%5 0d" % 1 # => " 0001"

Specifying width multiple times:
"%50+30+20+10+5d" % 5 # => "   +5"
"%50 30 20 10 5d" % 5 # => "    5"

I think they should be considered invalid instead. That would avoid
confusion in the case of typos.

Kind regards,
Florian Gross