From: Aaron Smith Date: 2007-03-13T09:36:20+09:00 Subject: Re: OpenStruct,, know what keys are set Sharon Phillips wrote: > On 13/03/2007, at 6:59 AM, Aaron Smith wrote: > >> nice one, that's faster.. > marshal_dump returns @table, so marshal_dump.keys == @table.keys > except that @table is not accessable from outside OpenStruct. > http://www.ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/ > OpenStruct.html > Click on the [Source] link to see the code behind these methods. > > Note that some of your examples here return symbols (2 and 5) whilst > 3 and 4 take an extra step of transforming these into strings. > > Looks like you're having fun :) > Dave Hey Dave, thanks, yes I love ruby. I've never had so much fun with a programming language. It didn't even occur to me I have k.to_s in example 4. I appreciate you're input. -a -- Posted via http://www.ruby-forum.com/.