From 2e085f67d4132ac8e01dae5a4428014f51fd4829 Mon Sep 17 00:00:00 2001 From: Peter West Date: Mon, 3 Nov 2014 16:34:44 +0000 Subject: Delegate comparison operator to value --- activesupport/lib/active_support/duration.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activesupport/lib/active_support') 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: -- cgit v1.2.3