From: Jamis Buck Date: 2004-08-21T01:12:20+09:00 Subject: Re: YAML and line numbers why the lucky stiff wrote: > Well, yeah. You'll never need the line number for every object, so > here's what I'm thinkin: > > conf = YAML.load_file( "package.yml" ) > YAML.line_number_of( conf['id'] ) > > Which basically amounts to: > > parser = YAML::Parser.new > conf = parser.load( "package.yml" ) > line = parser.line_number_of( conf['id'] ) > > The lookup table gets stored in the extension. That would work fine for my purposes as well. Whichever ends up being easier to code, I guess. I'm not picky. :) - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis "I use octal until I get to 8, and then I switch to decimal."