From: Jeremy Tregunna Date: 2006-09-12T16:47:49+09:00 Subject: Re: newbie: yaml array of arrays On 06-09-12, at 03:40, allan.m.miller@gmail.com wrote: > Hello, > > I'm new to yaml, and yaml in Ruby. > > I'm trying to create a yaml file in a text editor, one part of which > will consist of an array of of arrays. The data structure I'm trying > to represent is: > > [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']] > > an array of three arrays. > > I've tried to create this yaml file in a text editor (test.cfg): > > I'm sure my approach is completely off - how does one represent an > array of arrays in yaml, and load it into a Ruby array of arrays? You wanted YAML.load_file not YAML.load; and a yaml file that looks like this: --- - - a - b - c - - d - e - f - - g - h - i Then try: YAML.load_file 'your_file.yaml' -- Jeremy Tregunna jtregunna@blurgle.ca