Project

General

Profile

Actions

Bug #9982

closed

Kernel#sprintf: unmbered widht and precision with numbered argument

Added by nobu (Nobuyoshi Nakada) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Target version:
ruby -v:
trunk
[ruby-dev:48330]

Description

次のコードがエラーにならず、変換対象の引数が幅や精度としても使われています。

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

Also available in: Atom PDF

Like0
Like0Like0Like0