From: Paul Hepworth Date: 2006-07-08T01:23:41+09:00 Subject: Re: hyphens in variable names Robert Klemme wrote: > 2006/7/7, Paul Hepworth : >> Example XML: >> Example Ruby : >> >> for tlist in object.tree-lists >> ... >> end >> >> Error would be: >> >> NoMethodError in TreeController#importproject >> undefined method `tree' for # > > Either use method send or use another tool to work with XML Are you referring to something like: object.send('tree-list') I did a quick search, but have not tried it yet. > or use > another way to access objects (if this lib provides one, maybe > object["tee-list"] or object[:tree-list]). The tree-lists and tree-list are both hashes, but for some reason I still get exceptions. I will keep playing with it. Surely I am not the only one that has run into this problem. Thanks for your help! > > Kind regards > > robert -- Posted via http://www.ruby-forum.com/.