From c00f2d25de640b8de1c8583474085f3836ee1768 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Sun, 5 Apr 2009 10:08:54 -0500 Subject: TimeWithZone.name returns 'Time', to further thwart type checking --- activesupport/lib/active_support/time_with_zone.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport/lib/active_support/time_with_zone.rb') diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 518ca7742f..2574f4e88e 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -31,6 +31,11 @@ module ActiveSupport # t.is_a?(Time) # => true # t.is_a?(ActiveSupport::TimeWithZone) # => true class TimeWithZone + + def self.name + 'Time' # Report class name as 'Time' to thwart type checking + end + include Comparable attr_reader :time_zone -- cgit v1.2.3