From: Mark Hubbart Date: 2004-04-27T16:41:52+09:00 Subject: OT: key:val hashes (was Re: Approaches to localization?) On Apr 27, 2004, at 12:00 AM, Jean-Hugues ROBERT wrote: >> Now that the battle field is changed (i.e. we have key:val hashes) >> could we insist on this feature a little more? :) > > We have key: val ? I tried, that does not work in 1.8 (is it 1.9 ?). > However, try this: > p {a:"1"} > It apparently does nothing, weird ? well, it will do nothing anyway, since it thinks you are trying to pass a block to Kernel#p... but: mark@imac% ruby -v -e'p({a:1,b:2})' ruby 1.9.0 (2004-04-11) [powerpc-darwin] {:b=>2, :a=>1} I'm not sure when this was implemented; in fact, I didn't know it was there already until now :) very nice, thanks matz! cheers, --Mark