From: Andrea Gianarro Date: 2008-07-23T22:06:22+09:00 Subject: Re: Generate accessors for an hash James Coglan wrote: > You might be better off with method_missing > > class Hash > def method_missing(name, value = nil) > name = name.to_s > if name =~ /=$/ > self[name.sub(/=$/, '')] = value > else > return self[name] > end > end > end Thank you very much, that's exactly what I did. Strange ruby behaviour anyway. :P bye, Andrea Gianarro -- Posted via http://www.ruby-forum.com/.