From: "Hal E. Fulton" Date: 2003-04-11T04:52:52+09:00 Subject: Re: changing behavior of literal {:k => :v} Hmm. I think it means that the end result is the same, not that all the internal gyrations are the same. Still I've wondered whether this could have a "hook" added. But it might not be worth the effort. Hal ----- Original Message ----- From: "ahoward" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Thursday, April 10, 2003 2:46 PM Subject: Re: changing behavior of literal {:k => :v} On Fri, 11 Apr 2003, Hal E. Fulton wrote: > I once wanted to do this... the conclusion I > came to was that it is not possible. bummer. the pickaxe sort of implies it is : ... class methods [ ] Hash[ [ key => value ]* ] -> aHash Creates a new hash populated with the given objects. Equivalent to the literal { key, value, ... }. Keys and values occur in pairs, so there must be an even number of arguments. Hash["a", 100, "b", 200] � {"a"=>100, "b"=>200} Hash["a" => 100, "b" => 200] � {"a"=>100, "b"=>200} { "a" => 100, "b" => 200 } � {"a"=>100, "b"=>200} ... i'm referring to the last bit. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================