[ruby-dev:48330] [ruby-trunk - Bug #9982] [Open] Kernel#sprintf: unmbered widht and precision with numbered argument
From:
nobu@...
Date:
2014-06-26 18:35:20 UTC
List:
ruby-dev #48330
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/