From 0d2ce9d72396f449a15a3f914248cbc8cc8a4a4f Mon Sep 17 00:00:00 2001 From: Konstantinos Rousis Date: Thu, 22 Oct 2015 12:43:41 +0200 Subject: Change Integer#year to return a Fixnum instead of a Float to improve consistency --- activesupport/lib/active_support/core_ext/integer/time.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/integer/time.rb b/activesupport/lib/active_support/core_ext/integer/time.rb index f0b7382ef3..87185b024f 100644 --- a/activesupport/lib/active_support/core_ext/integer/time.rb +++ b/activesupport/lib/active_support/core_ext/integer/time.rb @@ -23,7 +23,7 @@ class Integer alias :month :months def years - ActiveSupport::Duration.new(self * 365.25.days, [[:years, self]]) + ActiveSupport::Duration.new(self * 365.25.days.to_i, [[:years, self]]) end alias :year :years end -- cgit v1.2.3