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
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
{
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
3 matches
Mail list logo