I was reliving this post just now: http://ruby-talk.org/96022
Apparently this hasn't come to fruition yet? Is something like
this going to happen?
The initialize_copy idea seems fine to me; or even an init_yaml
or the equivalent.
For now I plan to use this bit of crudeness:
module YAML
class << self
alias_method :old_load, :load
end
def YAML.load(item)
x = YAML.old_load(item)
x.send(:initialize_copy,x)
x
end
end
Cheers,
Hal