From: matz@... (Yukihiro Matsumoto) Date: 2003-07-16T00:52:14+09:00 Subject: Re: Determining if a String is marshalled Hi, In message "Determining if a String is marshalled" on 03/07/16, Daniel Berger writes: |I was just wondering if there's a way to determine if a string has been |marshalled without visual inspection. Something along the lines of |"string.marshalled?" or "string.kind_of?(MarshaledString)". Is there a |regex I could use? Marshal string have its format version embedded at the top 2 bytes (no magic though). So that string[0,2] == Marshal.dump("")[0,2] should work for most of the cases. matz.