Forum: Ruby on Rails '=>' : Ruby or Rails?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2006-03-31 19:36
(Received via mailing list)
I'm trying to find an explanation of the difference between '=' and
'=>'.  I thought a good first step would be finding out whether this is
a Ruby or a Rails construct.  Then I'd dig in before bothering the list.
No joy at step 1.  Can anybody point me to the right documentation?

Thanks in advance,
Bill
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-03-31 19:42
(Received via mailing list)
Bill Walton wrote:
> I'm trying to find an explanation of the difference between '=' and
> '=>'.  I thought a good first step would be finding out whether this is
> a Ruby or a Rails construct.  Then I'd dig in before bothering the
> list.  No joy at step 1.  Can anybody point me to the right documentation?
It's Ruby.

In brief, '=' is a general assignment, while '=>' is specifically for
key-value relationships in hashes.

Theres some documentation here:
http://www.rubycentral.com/book/intro.html
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2006-03-31 20:25
(Received via mailing list)
Thank you, Alex.  I appreciate your help.

Best regards,
Bill
----- Original Message -----
From: "Alex Young" <alex@blackkettle.org>
To: <rails@lists.rubyonrails.org>
Sent: 2006-03-31 11:40 AM
Subject: Re: [Rails] '=>' : Ruby or Rails?


> Bill Walton wrote:
> > I'm trying to find an explanation of the difference between '=' and
> > '=>'.  I thought a good first step would be finding out whether this is
> > a Ruby or a Rails construct.  Then I'd dig in before bothering the
> > list.  No joy at step 1.  Can anybody point me to the right
documentation?
This topic is locked and can not be replied to.