I’m trying to deserialize a hash from a string:
names = '{foo:"bar"}'
@names_hash = Marshal.load(names)
but I get a TypeError:
TypeError: incompatible marshal file format (can't be read)
format version 4.8 required; 123.111 given
According to the docs Marshal.load should accept a String. Why am I getting the error?
Here’s the output of an IRB session:
What you’re doing looks more like JSON to me, than Marshaling.