Skip to content

Commit b874a39

Browse files
authored
Add context to marshalize method
1 parent 2791a53 commit b874a39

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/scientist/experiment.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ def generate_result(name)
329329

330330
private
331331

332+
# In order to support marshaling, we have to make the procs marshalable. Some
333+
# CI providers attempt to marshal Scientist mismatch errors so that they can
334+
# be sent out to different places (logs, etc.) The mismatch errors contain
335+
# code from the experiment. This code contains Procs - which can't be
336+
# marshaled until we run the following code.
332337
def marshalize(block)
333338
unless block.respond_to?(:_dump) || block.respond_to?(:_dump_data)
334339
def block._dump(_)

0 commit comments

Comments
 (0)