diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-11-29 13:02:14 -0500 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2016-11-29 13:02:14 -0500 |
commit | 32f215c3014e580e512db5e8772d0deadf3d6497 (patch) | |
tree | 3d0c3e9a972f371e0040c134f72c362faa3fda1a /activesupport/test/autoloading_fixtures/loads_constant.rb | |
parent | 4806317b65314c28a2608fc4e55fb0a160db2b7d (diff) | |
download | rails-32f215c3014e580e512db5e8772d0deadf3d6497.tar.gz rails-32f215c3014e580e512db5e8772d0deadf3d6497.tar.bz2 rails-32f215c3014e580e512db5e8772d0deadf3d6497.zip |
Treat combined durations as a single unit
Prior to this commit, `3.months - 3.months` would result in a duration
that has the "parts" of `[[:months, 3], [:months, -3]]`. This would mean
that it was subtly different than `2.months - 2.months`. When applied to
a time, the date might actually change if the resulting day doesn't
exist however many months in the future, even though in both cases we
just wanted to add `0`, which should always be an identity operation.
With this change, we now store the parts as a hash, so `3.months -
3.months` is simply stored as `{ months: 0 }`.
Diffstat (limited to 'activesupport/test/autoloading_fixtures/loads_constant.rb')
0 files changed, 0 insertions, 0 deletions