From 2c62baf4bf221aa8aa67f4625fe7011d40c44e82 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Thu, 4 Sep 2008 15:08:46 +0200 Subject: [PATCH] Handle the case where there is no ivar set. This happens on jruby due to a bug, but also on historically marshalled data. --- activesupport/lib/active_support/core_ext/time.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/core_ext/time.rb b/activesupport/lib/active_support/core_ext/time.rb index 2006cf4946431..78bbfc917c3d3 100644 --- a/activesupport/lib/active_support/core_ext/time.rb +++ b/activesupport/lib/active_support/core_ext/time.rb @@ -15,7 +15,7 @@ class << self alias_method :_original_load, :_load def _load(marshaled_time) time = _original_load(marshaled_time) - utc = time.send(:remove_instance_variable, '@marshal_with_utc_coercion') + utc = time.instance_variable_get('@marshal_with_utc_coercion') utc ? time.utc : time end end