aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* [Active Support] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix broken number_to_currency testsPrathamesh Sonpatki2016-01-291-0/+2
|
* Change number_to_currency behavior for checking negativityPrathamesh Sonpatki2016-01-291-5/+1
| | | | | | | | | | | - 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.
* Give respond_to? a SymbolAkira Matsuda2015-05-201-1/+1
|
* Freeze static arguments for gsubbrainopia2015-04-021-1/+1
|
* Prefer string patterns for gsubbrainopia2015-04-021-1/+1
| | | | | | | | | | | | | | | | | https://github.com/ruby/ruby/pull/579 - there is a new optimization since ruby 2.2 Previously regexp patterns were faster (since a string was converted to regexp underneath anyway). But now string patterns are faster and better reflect the purpose. Benchmark.ips do |bm| bm.report('regexp') { 'this is ::a random string'.gsub(/::/, '/') } bm.report('string') { 'this is ::a random string'.gsub('::', '/') } bm.compare! end # string: 753724.4 i/s # regexp: 501443.1 i/s - 1.50x slower
* Doc fix [ci skip]Sushruth Sivaramakrishnan2015-03-051-2/+2
|
* Do gsub with a regexp instead of a stringPablo Herrero2014-10-291-1/+1
|
* Avoid a hash creation since defaults is a new hash alreadyCarlos Antonio da Silva2013-12-031-1/+1
|
* Stop using local variables everywhere, make use of the readerCarlos Antonio da Silva2013-12-031-2/+2
|
* :sicssors:Rafael Mendonça França2013-12-021-2/+0
|
* Make execute priave APIRafael Mendonça França2013-12-021-1/+1
|
* Make load of NumberHelper thread safeRafael Mendonça França2013-12-021-0/+48