diff options
author | wycats <wycats@gmail.com> | 2010-03-27 12:16:50 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-27 12:17:17 -0700 |
commit | 4b9f1672313b120bdc3dfcceb375f3d72d43d103 (patch) | |
tree | 99d154639498962f17fbda2e6cc4e9750d99220d /activesupport/lib/active_support | |
parent | 4384a95b517ae98370dcca5f0aba4205b38527e6 (diff) | |
download | rails-4b9f1672313b120bdc3dfcceb375f3d72d43d103.tar.gz rails-4b9f1672313b120bdc3dfcceb375f3d72d43d103.tar.bz2 rails-4b9f1672313b120bdc3dfcceb375f3d72d43d103.zip |
Actually check the value of the ivar
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb | 6 |
1 files changed, 2 insertions, 4 deletions
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 |