On 2010-01-07 05:16:38 -0500, Florian Odronitz said: > Hi, > > I am trying to marshal objects with ruby 1.8 and read them with 1.9 but > I get an error on date objects: > ruby 1.8: > f=File.new('/tmp/date', 'w+'); f.puts Marshal.dump(Date.today); f.close > > ruby 1.9: > m=File.read('/tmp/date'); Marshal.load(m) > > gives me: > class Date needs to have method `_load' (TypeError) > > The versions of Marshal are identical, but in 1.8, Date has a _dump and > _load method, in 1.9 it does not. > > Am I missing something or is this a bug? > Any hints are appreciated. > > Thanks, > Florian Marshal isn't constant, it can only be expected to work when you are using the same version on Ruby. I'd suggest using YAML.