Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove unused `calculate_rounded_number` and `digit_count` | yuuji.yaginuma | 2017-11-04 | 1 | -8/+0 |
| | | | | These methods unused since 5533696. | ||||
* | Remove unused `NumberToRoundedConverter#digits_and_rounded_number` | yuuji.yaginuma | 2017-09-19 | 1 | -12/+0 |
| | | | | `digits_and_rounded_number` is unused since #26628 | ||||
* | [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` | Koichi ITO | 2017-07-11 | 1 | -0/+1 |
| | |||||
* | Use frozen-string-literal in ActiveSupport | Kir Shatrov | 2017-07-09 | 1 | -0/+1 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | number_to_rounded_converter: extract rounding logic | Michael Hoy | 2017-03-16 | 1 | -26/+6 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -1/+1 |
| | |||||
* | applies new string literal convention in activesupport/lib | Xavier Noria | 2016-08-06 | 1 | -5/+5 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Freezing couple of more string '0' & '.' and using the string appending to ↵ | Ankit Gupta | 2016-04-11 | 1 | -2/+4 |
| | | | | do the same string manipulation. This was we avoid the duplicate strings with freeze and append modifies existing string | ||||
* | Freezing the dots as they are causing extra string initialization on every ↵ | Ankit Gupta | 2016-04-10 | 1 | -1/+1 |
| | | | | iteration of calling the helper. Eases on some memory bloat | ||||
* | `number_to_percentage` and `precision: 0` work with `NAN` and `INFINITY`. | Yves Senn | 2015-03-06 | 1 | -1/+1 |
| | | | | Closes #19227. | ||||
* | Merge pull request #12067 from jackxxu/keep_precision | Rafael Mendonça França | 2015-02-06 | 1 | -25/+28 |
| | | | | | | | | | Enable number_to_percentage to keep the number's precision by allowing :precision option value to be nil Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/number_helper.rb activesupport/test/number_helper_test.rb | ||||
* | Use zero-padding for number_to_rounded_converter | Zachary Scott | 2014-08-22 | 1 | -1/+1 |
| | |||||
* | Fixes the digits counter of AS's NumberToRoundedConverter | Xavier Noria | 2014-08-20 | 1 | -1/+1 |
| | | | | | | | | | | | 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. | ||||
* | Fix AS::NumberHelper results with rationals | Juanjo Bazán | 2014-05-31 | 1 | -5/+1 |
| | | | | | | | | | | :precision was incorrectly being applied to Rationals before: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.3" after: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.33" | ||||
* | fix `number_to_percentage` with `Float::NAN`, `Float::INFINITY`. | Yves Senn | 2014-03-17 | 1 | -2/+1 |
| | | | | | | | Closes #14405. This is a follow-up to 9e997e9039435617b6a844158f5437e97f6bc107 to restore the documented behavior. | ||||
* | Fix AS::NumberHelper results with large precisions | Kenta Murata & Akira Matsuda | 2013-12-20 | 1 | -7/+37 |
| | | | | | | | | | before: ActiveSupport::NumberHelper.number_to_rounded '3.14159', precision: 50 => "3.14158999999999988261834005243144929409027099609375" after: ActiveSupport::NumberHelper.number_to_rounded '3.14159', precision: 50 => "3.14159000000000000000000000000000000000000000000000" | ||||
* | Remove earlier return in favor of conditional | Carlos Antonio da Silva | 2013-12-03 | 1 | -6/+9 |
| | |||||
* | Stop using local variables everywhere, make use of the reader | Carlos Antonio da Silva | 2013-12-03 | 1 | -5/+5 |
| | |||||
* | Rename variable that holds whether or not the class should validate a float ↵ | Carlos Antonio da Silva | 2013-12-03 | 1 | -2/+2 |
| | | | | number | ||||
* | :sicssors: | Rafael Mendonça França | 2013-12-02 | 1 | -2/+0 |
| | |||||
* | Make execute priave API | Rafael Mendonça França | 2013-12-02 | 1 | -1/+2 |
| | |||||
* | Make load of NumberHelper thread safe | Rafael Mendonça França | 2013-12-02 | 1 | -0/+60 |