Permalink
Browse files

Add missing require.

If you selectively require core_exts (e.g., require
'active_support/core_ext/string'), it is possible for
'active_support/core_ext/time/calculations' to be required when
`ActiveSupport::TimeWithZone` is not available. If this happens, the next call
to Time.=== will fail with a NameError.
  • Loading branch information...
1 parent 51b055b commit e6d4dc3ec4e6e3d4dd9e5db6cdd91f691d546609 @rsutphin committed Jun 25, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 activesupport/lib/active_support/core_ext/time/calculations.rb
@@ -1,5 +1,6 @@
require 'active_support/duration'
require 'active_support/core_ext/time/conversions'
+require 'active_support/time_with_zone'
class Time
COMMON_YEAR_DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

0 comments on commit e6d4dc3

Please sign in to comment.