[Rails] Re: Re: Hash or not a Hash?!

2010-07-17 Thread Abder-Rahman Ali
Thanks all for your replies. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: Re: Hash or not a Hash?!

2010-07-16 Thread Robert Walker
Robert Walker wrote: > I also wanted to point out that there is a new "optional" syntax for > hash key/value pairs introduced in Ruby 1.9: > > { :x: y } same as { :x => y } same as :x: y same as :x => y [CORRECTION] Sorry, the above syntax is not quite right. New 1.9 syntax should be: y = 10 {

[Rails] Re: Re: Hash or not a Hash?!

2010-07-16 Thread Robert Walker
Dave Aronson wrote: > On Fri, Jul 16, 2010 at 09:02, Ram wrote: >> �> :x=>"new_x" >> >> Here x is the key and "new_x" is the value. >> >>> :y=>{:x=>X.new} >> >> Here y is the key and another hash, {:x => X.new}, is the value. And >> within this hash again, x is the key and X.new is the value. Mor