diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-01-29 11:46:39 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-01-29 12:21:26 +0530 |
commit | d3f178bb92473b4d7bb400be56c983203b1662e9 (patch) | |
tree | ede637d5ca4dfbb8724580030c941c3bb1d1c7cd /actionpack/bin | |
parent | c942298fda223672b74b953b9ce369674033727b (diff) | |
download | rails-d3f178bb92473b4d7bb400be56c983203b1662e9.tar.gz rails-d3f178bb92473b4d7bb400be56c983203b1662e9.tar.bz2 rails-d3f178bb92473b4d7bb400be56c983203b1662e9.zip |
Change number_to_currency behavior for checking negativity
- Instead of using `to_f.phase`, just use `to_f.negative`?.
- This change works same for all cases except when number is "-0.0".
-0.0.to_f.negative? => false
-0.0.to_f.phase? => pi
- So -0.0 will be treated as positive from now onwards.
- So this change reverts changes from https://github.com/rails/rails/pull/6512.
- But it should be acceptable as we could not find any currency which
supports negative zeros.
Diffstat (limited to 'actionpack/bin')
0 files changed, 0 insertions, 0 deletions