Bugs item #3332, was opened at 2006-01-26 09:55
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3332&group_id=426

Category: Standard Library
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Hirokazu Yamamoto (ocean)
Assigned to: Nobody (None)
Summary: YAML cannot restore instance variable of subclass of Hash/Array/String

Initial Comment:
This was originally reported by sakazuki [ruby-list:41800]

//////////////////////////

require 'yaml'

class B < Hash
  def initialize(*v)
    @order = $order
    super
  end
  attr_accessor :order
end

$order = "foo"
b = B.new
$order = "boo"

p Marshal.load(Marshal.dump(b)).order #=> "foo"
p YAML.load(YAML.dump(b)).order       #=> nil




----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3332&group_id=426