From: matz@... Date: 2017-07-20T22:06:42+00:00 Subject: [ruby-core:82119] [Ruby trunk Bug#13761][Closed] incomplete format specifier Issue #13761 has been updated by matz (Yukihiro Matsumoto). Status changed from Open to Closed No, it's not a bug. Use "%0.0f%%" (double %) instead. Matz ---------------------------------------- Bug #13761: incomplete format specifier https://bugs.ruby-lang.org/issues/13761#change-65870 * Author: ahorek (Pavel Rosick��) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- 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] ``` -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>