Bug #9982
closed
Kernel#sprintf: unmbered widht and precision with numbered argument
Added by nobu (Nobuyoshi Nakada) over 10 years ago.
Updated about 10 years ago.
Description
次のコードがエラーにならず、変換対象の引数が幅や精度としても使われています。
sprintf("%1$*d", 3) #=> " 3"
sprintf("%1$.*d", 3) #=> "003"
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r46569.
sprintf.c: unnumbered asterisk with numbered argument
- sprintf.c (GETASTER): should not use the numbered argument to be
formatted, raise ArgumentError instead.
[ruby-dev:48330] [Bug #9982]
- 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.
- 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.
Also available in: Atom
PDF
Like0
Like0Like0Like0