Received the error ruby can’t dump hash with default proc. It was raised by a 3rd party lib, that was using
.
Turns out, I had a hash defined like this:1
Marshal.dump
hash = Hash.new{|h,k| h[k] = []}
The fix was to remove the initialization block, and instead use it like this in my code:
hash[some_value] ||= []
hash[some_value] << some_other_value