From: "trans. (T. Onoma)" Date: 2004-09-28T21:38:31+09:00 Subject: Re: Best name for "this method" ? On Tuesday 28 September 2004 08:19 am, Robert Klemme wrote: > You mean like this: > >> s=SymHash.new.update( :a=>2, :b=>3 ) > > [snip] > > class SymHash < Hash > def method_missing(sym,*args) > key = sym.to_s.sub!(/=$/, '') > if key > self[key.to_sym]=args[0] > else > self[sym] > end > end > end I knew someone would show me that ;) I also have a simple #to_obj method for Hash itself that I use. Alas, both have their shortcomings. > I'd rather not have another separator - "." and "::" is enough IMHO. Agree. This was not really thought out. > > h:a > > h:b > > > > But I digress. > > I guess so. :-) But sometimes good ideas come from this. That's good b/c I'm a chronic digressor ;) T.