diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb index 56c1b06608..e703fca7a7 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb @@ -194,7 +194,7 @@ def end_of_month # Returns a new date/time representing the end of the year. # DateTime objects will have a time set to 23:59:59. def end_of_year - result = change(:month => 12).end_of_month + change(:month => 12).end_of_month end alias :at_end_of_year :end_of_year