From: nobu@...
Date: 2014-06-26T18:35:20+00:00
Subject: [ruby-dev:48330] [ruby-trunk - Bug #9982] [Open] Kernel#sprintf: unmbered widht and precision with numbered argument

Issue #9982 has been reported by Nobuyoshi Nakada.

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

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

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




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