Actions
Backport #2548
closedMarshal dump/load fails when given an array containing certain (rather silly) symbols
Status:
Closed
Assignee:
Description
=begin
Either Marshal.dump or Marshal.load is failing to do the right thing with certain symbols which name backreference variables of unusual size. Here's the simplest example I could find:
$ ruby19 -e 'p Marshal.load Marshal.dump [:$98349576875974523789734582394578,nil]'
-e:1:in load': dump format error(0x0) (ArgumentError) from -e:1:in
'
This case works without a problem in ruby 1.8. The problem goes away if the second element of the array is left off, or if the symbol is used by itself without an array enclosing it. Marshal.load is raising the error, but I'm not sure if the problem is there or if Marshal.dump is emitting something incorrect.
Tested on ruby 1.9.1, but I'm guessing 1.9.2 has the same issue.
=end
Actions
Like0
Like0Like0Like0