Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marshalize mismatch errors #168

Merged
merged 4 commits into from
Nov 4, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't override preexisting marshal implementations
  • Loading branch information
agentdon authored Nov 2, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2791a53969e63f54bf1a32a8092b08094fff0760
6 changes: 4 additions & 2 deletions lib/scientist/experiment.rb
Original file line number Diff line number Diff line change
@@ -330,8 +330,10 @@ def generate_result(name)
private

def marshalize(block)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining why we want to make everything marshalable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Added. 👌

def block._dump(_)
to_s
unless block.respond_to?(:_dump) || block.respond_to?(:_dump_data)
def block._dump(_)
to_s
end
end
end
end