Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bring back compatibility with old ActiveSupport versions without Time…

…WithZone defined

(cherry picked from commit dfb2cdd)
  • Loading branch information...
commit 2960784d8118957bd309dd77275738c1c9ae2d0c 1 parent 23b9ad9
@thbar thbar authored committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/awesome_print/ext/active_support.rb
2  lib/awesome_print/ext/active_support.rb
@@ -14,7 +14,7 @@ def self.included(base)
def cast_with_active_support(object, type)
cast = cast_without_active_support(object, type)
if defined?(::ActiveSupport) && defined?(::HashWithIndifferentAccess)
- if object.is_a?(::ActiveSupport::TimeWithZone) || object.is_a?(::Date)
+ if (defined?(::ActiveSupport::TimeWithZone) && object.is_a?(::ActiveSupport::TimeWithZone)) || object.is_a?(::Date)
cast = :active_support_time
elsif object.is_a?(::HashWithIndifferentAccess)
cast = :hash_with_indifferent_access
Please sign in to comment.
Something went wrong with that request. Please try again.