hi,
is there some character or sequence of characters which is guaranteed
*not* to occur in a string produced by Marshal.dump on some arbitrary
object hierarchy.
thanks,
_c
···
--
Posted via http://www.ruby-forum.com/.
hi,
is there some character or sequence of characters which is guaranteed
*not* to occur in a string produced by Marshal.dump on some arbitrary
object hierarchy.
thanks,
_c
--
Posted via http://www.ruby-forum.com/.
Christophe Mckeon wrote:
hi,
is there some character or sequence of characters which is guaranteed
*not* to occur in a string produced by Marshal.dump on some arbitrary
object hierarchy.
Think not. If you do:
result = Marshal.dump(some_sequence_of_characters)
then the characters of the string some_sequence_of_characters are going to be embedded in the result string.
For example:
irb(main):001:0> Marshal.dump("1234")
=> "\004\b\"\t1234"
irb(main):002:0> Marshal.dump("\001\002\003\004")
=> "\004\b\"\t\001\002\003\004"
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407