aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorKonstantinos Rousis <rousisk@gmail.com>2015-10-22 12:43:41 +0200
committerKonstantinos Rousis <rousisk@gmail.com>2015-10-22 12:44:03 +0200
commit0d2ce9d72396f449a15a3f914248cbc8cc8a4a4f (patch)
tree3e32cb83aab10ff7b89d88e74de9995b41555641 /activesupport/lib/active_support
parentf66b68173a11d0ef8f4bb6253386c15d031017ba (diff)
downloadrails-0d2ce9d72396f449a15a3f914248cbc8cc8a4a4f.tar.gz
rails-0d2ce9d72396f449a15a3f914248cbc8cc8a4a4f.tar.bz2
rails-0d2ce9d72396f449a15a3f914248cbc8cc8a4a4f.zip
Change Integer#year to return a Fixnum instead of a Float to improve consistency
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/integer/time.rb2
1 files changed, 1 insertions, 1 deletions
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