aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/rails
diff options
context:
space:
mode:
authorJoost Lubach <joost@yoazt.com>2013-08-07 15:18:30 +0200
committerJoost Lubach <joost@yoazt.com>2013-08-07 16:46:30 +0200
commit369a107c8e30a15d03cb2e85242bc604fe7a02a3 (patch)
tree54542123900dfe48790f8043f474e3f8b4763eb4 /activerecord/lib/rails
parent4343e2dda25222d3586835bb25009e1a490cda8f (diff)
downloadrails-369a107c8e30a15d03cb2e85242bc604fe7a02a3.tar.gz
rails-369a107c8e30a15d03cb2e85242bc604fe7a02a3.tar.bz2
rails-369a107c8e30a15d03cb2e85242bc604fe7a02a3.zip
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
Diffstat (limited to 'activerecord/lib/rails')
0 files changed, 0 insertions, 0 deletions