Marshal.dump not dumping entire object?

Greetings,

	I first want to say that this problem is happening with the Runt

gem. This may is likely an implementation issue between Marshal and
Runt. While I’ve simultaneously filed this problem with Matt Lipper,
I’m also hoping someone here can can guide me a little - either in
implementation (usage of Marshal), or to aid me to fix Runt to
support Marshal.

script/console
Loading development environment.

start_time = Runt::PDate.min(Runt::REDay::ANY_DATE.year,
Runt::REDay::ANY_DATE.month,Runt::REDay::ANY_DATE.day, 8, 11)
=> #<Runt::PDate: 3531621371/1440,0,2299161>

data = Marshal.dump(start_time)
=> “\004\010u:\020Runt::PDateA\004\010[\010o:\rRational\a:
\017@numeratorl+\a\373C\200\322:\021@denominatori\002\240\005i\000i
\003\031\025#”

obj = Marshal.load(data)
=> #<Runt::PDate: 3531621371/1440,0,2299161>

start_time.date_precision
=> #<Runt::DPrecision::Precision:0x2753cfc @precision=4>

start_time.date_precision.precision
=> 4

obj.date_precision
=> nil

as you can see - after round tripping through Marshal, date_precision
isn’t restored (likely not marshalled) to obj.

Is is possible that Runt’s date_precision violates a rule for
Marshal.dump?

I can note from the source the following,
#Pseudo Singletons:
YEAR = Precision.year
MONTH = Precision.month
DAY = Precision.day
I seem to remember something about singletons and YAML. Does the same
hold for Marshal?

Perhaps it’s a deep copy issue? specifying Marshal.dump(start_time,
10) (10 is very deep) makes no diff.

Thanx for any thoughts or references that can take me to the next level.

cheers,
Jodi