mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Explain why we have explicit marshaling methods
This commit is contained in:
parent
9d7d6336d7
commit
b707a6d0eb
1 changed files with 6 additions and 2 deletions
|
@ -235,11 +235,15 @@ module ActionView
|
|||
end
|
||||
end
|
||||
|
||||
def marshal_dump
|
||||
|
||||
# Exceptions are marshaled when using the parallel test runner with DRb, so we need
|
||||
# to ensure that references to the template object can be marshaled as well. This means forgoing
|
||||
# the marshalling of the compiler mutex and instantiating that again on unmarshaling.
|
||||
def marshal_dump # :nodoc:
|
||||
[ @source, @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @formats, @variants ]
|
||||
end
|
||||
|
||||
def marshal_load(array)
|
||||
def marshal_load(array) # :nodoc:
|
||||
@source, @identifier, @handler, @compiled, @original_encoding, @locals, @virtual_path, @updated_at, @formats, @variants = *array
|
||||
@compile_mutex = Mutex.new
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue