From: Bruce D'Arcus Date: 2005-06-07T00:40:28+09:00 Subject: Re: newbie read.scan (?) question One followup. Why if I dump my list of article objects to YAML, do I end up with this: - !ruby/object:Article author: - - "Hovorka, Alice J." title: - - "The (Re) Production of Gendered Positionality in Botswana's Commercial Urban Agriculture Sector" url: http://journals.ohiolink.edu/cgi-bin/sciserv.pl?collection=journals&journal=00045608 I'm referring to the fact that article and title content aren't represented the same as url (which is what I was expecting). I have these two classes: class Article include Journals attr_reader :title, :author, :description, :url def initialize(title, author, url) @title = title @author = author @url = url end def to_s "#@title, #@author" end def abstract # end def refer Journals::const_get(:BASE_URL) + "/" + @url + "&form=refer&file=file.txt" end def pdf Journals::const_get(:BASE_URL) + "/" + @url + "&form=pdf&file=file.pdf" end end class Articles # attr_reader :articles def initialize @articles = Array.new end def append(article) @articles.push(article) self end def [](index) @articles[index] end end .... and then: list = Articles.new ... and at the end: File.open("articles.yaml", "w") {|f| YAML.dump(list.articles, f)} Or is everything fine? Bruce