aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorPeter West <source@petewest.org>2014-11-03 16:34:44 +0000
committerPeter West <source@petewest.org>2014-11-03 16:34:44 +0000
commit2e085f67d4132ac8e01dae5a4428014f51fd4829 (patch)
tree01adc8610c4de645a0a2282088a4a473b46616ae /activesupport/lib/active_support
parentaf9702c015caba73fa99782360b123a1debe6d81 (diff)
downloadrails-2e085f67d4132ac8e01dae5a4428014f51fd4829.tar.gz
rails-2e085f67d4132ac8e01dae5a4428014f51fd4829.tar.bz2
rails-2e085f67d4132ac8e01dae5a4428014f51fd4829.zip
Delegate comparison operator to value
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/duration.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb
index 584fc1e1c5..fde2d0bf79 100644
--- a/activesupport/lib/active_support/duration.rb
+++ b/activesupport/lib/active_support/duration.rb
@@ -103,6 +103,8 @@ module ActiveSupport
@value.respond_to?(method, include_private)
end
+ delegate :<=>, to: :value
+
protected
def sum(sign, time = ::Time.current) #:nodoc: