Issue #9982 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

Backported into `ruby_2_1` branch at r47376.

----------------------------------------
Bug #9982: Kernel#sprintf: unmbered widht and precision with numbered argument
https://bugs.ruby-lang.org/issues/9982#change-48638

* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Category: core
* Target version: current: 2.2.0
* ruby -v: trunk
* Backport: 2.0.0: REQUIRED, 2.1: DONE
----------------------------------------
次のコードがエラーにならず、変換対象の引数が幅や精度としても使われています。

~~~ruby
sprintf("%1$*d", 3)  #=> "  3"
sprintf("%1$.*d", 3) #=> "003"
~~~




-- 
https://bugs.ruby-lang.org/