1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib
Xavier Noria 500deece9e Fixes the digits counter of AS's NumberToRoundedConverter
Zero has one digit, but Math.log10(0) returns -Infinity. The method
needs to special-case zero.

The patch adds a regression test that is not clearly related to the
underlying issue because digit_count is private and has no coverage.
Gray area.

This bug was uncovered by 60062cf.
2014-08-20 16:25:35 +02:00
..
active_support Fixes the digits counter of AS's NumberToRoundedConverter 2014-08-20 16:25:35 +02:00
active_support.rb update copyright notices to 2014. [ci skip] 2014-01-01 23:59:49 +05:30