From: usa@... Date: 2014-09-10T03:05:48+00:00 Subject: [ruby-dev:48529] [ruby-trunk - Bug #9982] Kernel#sprintf: unmbered widht and precision with numbered argument Issue #9982 has been updated by Usaku NAKAMURA. Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE backported into `ruby_2_0_0` at r47497. ---------------------------------------- Bug #9982: Kernel#sprintf: unmbered widht and precision with numbered argument https://bugs.ruby-lang.org/issues/9982#change-48771 * 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: DONE, 2.1: DONE ---------------------------------------- 次のコードがエラーにならず、変換対象の引数が幅や精度としても使われています。 ~~~ruby sprintf("%1$*d", 3) #=> " 3" sprintf("%1$.*d", 3) #=> "003" ~~~ -- https://bugs.ruby-lang.org/