Actions
Bug #13761
closedincomplete format specifier
Description
is it a bug?
'%0.0f%' % 45
expected
ruby 2.4.1 => '45%'
actual
ruby trunk => ArgumentError: incomplete format specifier
workaround
'%0.0f%s' % [45, '%']
=> '45%'
ruby -v
ruby 2.5.0dev (2017-07-21 trunk 59380) [x86_64-linux]
Updated by matz (Yukihiro Matsumoto) over 7 years ago
- Status changed from Open to Closed
No, it's not a bug. Use "%0.0f%%" (double %) instead.
Matz
Updated by usa (Usaku NAKAMURA) over 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: WONTFIX, 2.3: WONTFIX, 2.4: UNKNOWN
Actions
Like0
Like0Like0