Monday, April 30, 2012

[Rails] Re: parentheses vs braces

Leandro Facchinetti wrote in post #1058817:
> It's Ruby. If the last argument in a function call is a hash, you can
> omit
> the braces.

I think technically it has to do with ambiguity. It doesn't really have
anything do with it being the last argument, but rather omitting the
braces anywhere else in the argument list would cause ambiguity.
Although, that's really just semantics.

--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate