Skip to content

Commit 2791a53

Browse files
authored
Don't override preexisting marshal implementations
1 parent 0231dd5 commit 2791a53

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/scientist/experiment.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,10 @@ def generate_result(name)
330330
private
331331

332332
def marshalize(block)
333-
def block._dump(_)
334-
to_s
333+
unless block.respond_to?(:_dump) || block.respond_to?(:_dump_data)
334+
def block._dump(_)
335+
to_s
336+
end
335337
end
336338
end
337339
end

0 commit comments

Comments
 (0)