diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2011-10-03 10:53:09 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2011-10-03 10:53:09 -0700 |
commit | c10fcd26376d9cdc4d4a27b66271ab33413ca18f (patch) | |
tree | c60802e88fdc81c145c6f53b1e7310cf76e645dc /activesupport/lib | |
parent | e141cbdff5655004e358f0e96fa5b606b02b761a (diff) | |
parent | da8f00a55c55bd4af152150b71823627a55bba5b (diff) | |
download | rails-c10fcd26376d9cdc4d4a27b66271ab33413ca18f.tar.gz rails-c10fcd26376d9cdc4d4a27b66271ab33413ca18f.tar.bz2 rails-c10fcd26376d9cdc4d4a27b66271ab33413ca18f.zip |
Merge pull request #2801 from jeremyevans/patch-1
Fix obviously breakage of Time.=== for Time subclasses
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index a15a06d0e4..372dd69212 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -9,7 +9,7 @@ class Time class << self # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances def ===(other) - other.is_a?(::Time) + super || (self == Time && other.is_a?(ActiveSupport::TimeWithZone)) end # Return the number of days in the given month. |