You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We came across an issue where we created a ClassKit instance from a hash, then used that same hash elsewhere to write data to a Redis cache. This was in turn calling Marshal.dump(hash) but that failed with a TypeError: can't dump hash with default proc.
We came across an issue where we created a ClassKit instance from a hash, then used that same hash elsewhere to write data to a Redis cache. This was in turn calling
Marshal.dump(hash)
but that failed with a TypeError: can't dump hash with default proc.Here's a test case to illustrate this:
This seems to be caused by the
from_hash
method callingHashKit::indifferent!
on the hash parameter: https://github.com/Sage/class_kit/blob/master/lib/class_kit/helper.rb#L54Would a possible fix be to create a copy of the hash before calling
Hashkit::indifferent!
?The text was updated successfully, but these errors were encountered: