diff options
author | Daniel Colson <danieljamescolson@gmail.com> | 2018-11-24 11:42:28 -0500 |
---|---|---|
committer | Daniel Colson <danieljamescolson@gmail.com> | 2018-11-24 11:42:28 -0500 |
commit | 3cfb05daa4f1e76eaca0a79fc9df340af02ee3dc (patch) | |
tree | 2be27400a4dcf216105eb9dc24d50fa178b7899b /actioncable/test/test_helper_test.rb | |
parent | 171e32fc779fc26804f6670ea41850aec282d882 (diff) | |
download | rails-3cfb05daa4f1e76eaca0a79fc9df340af02ee3dc.tar.gz rails-3cfb05daa4f1e76eaca0a79fc9df340af02ee3dc.tar.bz2 rails-3cfb05daa4f1e76eaca0a79fc9df340af02ee3dc.zip |
Remove unnecessary reduce in Duration#inspect
When the `Duration` class was introduced in 276c9f29, the `parts` were
represented as an array of arrays
(for example `[[:seconds, 5], [:days, 3], [:seconds, 7]]`).
At that time the `reduce` in `#inspect` made sense,
since we would need to get the totals for each part
(the example would become `{ seconds: 12, days: 3 }`).
With the current version of `Duration` we call `to_h` on the `parts`
immediately on initialize, so now the `reduce` doesn't seem to be doing
anything meaningful.
Diffstat (limited to 'actioncable/test/test_helper_test.rb')
0 files changed, 0 insertions, 0 deletions