From: "Martin Müller" Date: 2007-02-04T01:15:06+09:00 Subject: Saving class with array property with YAML Hello I'm new to Ruby and unfortuantly I can't find an example anywhere to the following problem. I have the following class: class Article attr_accessor :author attr_accessor :title def inititialize(author, title) @autor = author @title = title end end class Book attr_accessor :year attr_accessor :volume attr_accessor :articles # array of articles def initialize(year, volume) @year = year @volume = volume @articles = Array.new end def insert(author, title) @articles.push(Article.new(author,title)) end end class Bookshelf ... end #create book testbook = Book.new(2007, 1) #insert 2 articles into the book testbook.insert("Martin Mueller", "Confessing that I'm a Ruby Dummy") testbook.insert("Hillary Clinton", "Elect me and Ruby will save our planet") #write Book to YAML File.open("testbook.yaml", "w") {|f| YAML.dump(testbook, f)} ----------------------- My question is: how can I bring Ruby to save also the Array?? I played around with to_yaml_properties but without success. thanks a lot for any hint! Best regards, Martin.