aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorGordon Chan <developer.gordon+github@gmail.com>2014-05-30 20:29:30 +1200
committerGordon Chan <developer.gordon+github@gmail.com>2014-05-30 20:41:39 +1200
commitc69baffdf752e2255fe1efc80ce32017bb1896e7 (patch)
treeacf37a7ea044c9513fbe9b12b2d5c1e8b9a437ca /Rakefile
parent6963e33829c11f7036b8c8015e2c5222a469c118 (diff)
downloadrails-c69baffdf752e2255fe1efc80ce32017bb1896e7.tar.gz
rails-c69baffdf752e2255fe1efc80ce32017bb1896e7.tar.bz2
rails-c69baffdf752e2255fe1efc80ce32017bb1896e7.zip
Fixed `ActiveSupport::TimeWithZone#-` so precision is not unnecessarily lost
When working with objects with a nanosecond component, the `-` method may unnecessarily cause loss of precision. `ActiveSupport::TimeWithZone#-` should return the same result as if we were using `Time#-`: Time.now.end_of_day - Time.now.beginning_of_day #=> 86399.999999999 Before: Time.zone.now.end_of_day.nsec #=> 999999999 Time.zone.now.end_of_day - Time.zone.now.beginning_of_day #=> 86400.0 After: Time.zone.now.end_of_day - Time.zone.now.beginning_of_day #=> 86399.999999999
Diffstat (limited to 'Rakefile')
0 files changed, 0 insertions, 0 deletions