Search code examples
ruby

Unknown sequence in ruby marshal


While writing parser for ruby marshal format i notised one strange thing. At one point after a variable comes sequence "\x04\x08". By documentation this is format version. But judging by common sense it should be only at start of file. Or in ruby i can write in file multiple streams and read them without problems. Or format obusficated and i have to skip all these sequences? Or something else?
Question probably dumb but i do not know ruby and do not want to know and nobody seems asked question about this.


Solution

  • There was error in code that read string data type and because of it i didn't realised that one stream holds exacly one variable. So now i know what to do.
    Also i do not belive that this is proper documentation for ruby because some data types unexplained (byte sequence) and some data types explained too vaguely (string encoding, instance variable).