mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Handle the case where there is no ivar set.
This happens on jruby due to a bug, but also on historically marshalled data.
This commit is contained in:
@@ -15,7 +15,7 @@ class Time
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user