I can't read this code at all, but, does this code basically contain the same code twice, so if something from the first half is removed the second half saves it?
They are checking the two instances and rescuing the corrupted one. But how exactly it works is beyond me.
eval eval"[eval||=9,instance_eval||=9].max_by{|s|s.size}#"##"
See the max_by ... size part