From 4b9f1672313b120bdc3dfcceb375f3d72d43d103 Mon Sep 17 00:00:00 2001 From: wycats Date: Sat, 27 Mar 2010 12:16:50 -0700 Subject: Actually check the value of the ivar --- .../lib/active_support/core_ext/time/marshal_with_utc_flag.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb') diff --git a/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb b/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb index 656939947c..8d46d80251 100644 --- a/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb +++ b/activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb @@ -9,11 +9,9 @@ if RUBY_VERSION < '1.9' time = _original_load(marshaled_time) time.instance_eval do if defined?(@marshal_with_utc_coercion) - remove_instance_variable("@marshal_with_utc_coercion") - utc - else - self + val = remove_instance_variable("@marshal_with_utc_coercion") end + val ? utc : self end end end -- cgit v1.2.3