Yaml and Bignum

i get an error reading a yaml file :

TypeError: allocator undefined for Bignum

afaik, it’s due to this line in my file :

mappings_file_mtime: !ruby/object:Bignum 1151152397

someone knows a workaround for that

this is a date in seconds since epoch, as far as i know, then i could
substract a constant, because i might change “epoch” to 2000 …

Le 19 juil. 06 à 01:00, Une bévue a écrit :

someone knows a workaround for that

the "workaround i’ve found is :

define :

CENT_MIL=100000.to_f
EPOCH_2006=Time.local(2006,7,19).to_i.to_f/CENT_MIL
add a method to the class Time :

class Time

def to_fref

self.to_i.to_f/CENT_MIL - EPOCH_2006

end

hoping with floating values the prob vanished…

yaml doesn’t complain anymore