aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/number_helper/number_to_human_converter.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* number_to_human_converter: round before calculating exponentMichael Hoy2017-03-161-4/+2
| | | | fixes #25664
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* modernizes hash syntax in activesupportXavier Noria2016-08-061-2/+2
|
* 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.
* Round some numbers more humanelyMax Jacobson2015-07-261-2/+4
| | | | Fix #20869
* 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
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Stop using local variables everywhere, make use of the readerCarlos Antonio da Silva2013-12-031-3/+3
|
* Rename variable that holds whether or not the class should validate a float ↵Carlos Antonio da Silva2013-12-031-2/+2
| | | | number
* :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/+68