rails/rails — pull request #11794 by yoazt (2013-08-07 13:22:12+00:00)
Title: Added method `#eql?` to `ActiveSupport::Duration`, in addition to `#==`.

Currently, the following returns `false`, contrary to expectation:

1.minute.eql?(1.minute)

Adding method `#eql?` will make this behave like expected. Method `#eql?` is
just a bit stricter than `#==`, as it checks whether the argument is also a
uration. Their parts may be different though.

1.minute.eql?(60.seconds) # => true
1.minute.eql?(60) # => false