From: "trans. (T. Onoma)" Date: 2004-11-15T06:14:16+09:00 Subject: Re: OpenStruct#update ? Hi David, On Sunday 14 November 2004 03:51 pm, David A. Black wrote: | On Mon, 15 Nov 2004, trans. (T. Onoma) wrote: | > How 'bout an OpenStruct#update for adding values after initialization. Or | > is there another way to do? | | OpenStruct needs to be very conservative about what methods it has, | since the whole point of it is to allow you to make up arbitrarily | named members. Why so conservative? So they don't overwrite standard object methods? I wondered why accessors weren't used. I suppose a hash is faster too. Hek, maybe '@' itself should be hash and forget about it ;) | But I'm also not sure what you need to do that you can't do. The | OpenStruct object should let you add values indefinitely. This is what I mean: o = OpenStruct.new( foo_hash ) # later ... o.update( bar_hash ) The reason is because I am modifying and using the object on the fly. Thanks, T.