Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Finding help
Luke Ivers
2/9/2007 3:09:00 PM
Luke Ivers wrote:
> I'm wanting to figure out what the &: syntax does, but I'm not exactly
> sure
> how to search for it given that it contains special characters... a
> search
> on google for "ruby &:" doesn't really give me anything worth looking
> at,
> and I just checked through the first edition of the Pickaxe (I don't own
> the
> second edition), and couldn't find anything in there, either (although,
> sometimes I miss really obvious things, so I suppose it's possible I
> just
> missed it in there).
>
> If someone could either explain it to me, or point me in the direction
> of
> something that explains it, I would greatly appreciate it.
>
> (And I also tried searching on ruby-forum.org for &:... it returns
> "Application Error")
>
> Thanks.
And, I think I just figured it out... it's using a symbol to reference a
function, and an & to turn it into a block? Then you can send a
function (wrapped in a closure) to another function expecting a block?
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Finding help
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password