From: MiG Date: 2004-09-17T23:39:10+09:00 Subject: Re: Redefining the { } behavior (Hash creation method) >Not planned, just because changing semantics of literals are too >dangerous, as dangerous as macros for my eyes. >matz. >p.s. >I'm thinking of preserving Hash order by not re-implement it by using >Tree or something, but by saving key order information along with hash >tables. >Hal Fulton I have the same problem - I want to create ordered Hash. Overriding literals should be dangerous, but it CAN be overriden now (not wholly). The only difference is that {} don't call initialize of Hash. I think it is more dangerous when there are two Hash behavior :-( I don't want to override {} to produce MyFoo, but want {} to behave the same way as Hash::[] Problem 2: I than tried to override Hash::[] but don't know what to do with it's argument. arg.inspect looks like Hash, but if I've tried arg.each, there is no each method. Jan Molic