> -----Original Message----- > From: Brent Roman [mailto:brent / mbari.org] > Sent: Tuesday, February 10, 2009 12:31 AM > To: ruby-core / ruby-lang.org > Subject: [ruby-core:21946] New hash : syntax for the 1.8 series? > > > I always liked the new hash symbol key colon syntax introduced in 1.9 > > h = {dog: "bark", cat: "meow", horse: "neigh", programmer: "z z z"} > > It's especially nice in method invocations: > > animal.noises dog: "bark", cat: "meow", horse: "neigh" > > Is anyone working working on porting this back to 1.8? > Anyone else interested in this? No. I used to be, but then decided it looked ugly with symbols: h = {dog: :bark} Will these parse? h = {object::bark} h = {dog: object::bark} h = {dog: ::Array.new::bark} Regards, Dan