Actions
Bug #12889
closedRegression of Ruby 2.4.preview2 string interpolation
Description
$ ./ruby -v
ruby 2.4.0dev (2016-07-10 trunk 55620) [x86_64-linux]
$ ./ruby -e 'puts ("%01.0f" % 1234567892.0)'
1234567892
https://github.com/ruby/ruby/commit/295f60b94d5ff6551fab7c55e18d1ffa6a4cf7e3
$ ./ruby -v
ruby 2.4.0dev (2016-07-10 trunk 55621) [x86_64-linux]
$ ./ruby -e 'puts ("%01.0f" % 1234567892.0)'
1234567893
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Status changed from Open to Closed
Applied in changeset r56557.
util.c: round to even
- util.c (ruby_dtoa): round to even, instead of rounding to
nearest. [ruby-core:77864] [Bug #12889]
Actions
Like0
Like0