Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
code block confusion
Carl Jenkins
8/11/2006 1:54:00 AM
I am sifting through the Ruby bible "Pickaxe" and I am not sure how you
figure out which methods can be passed a code block.
I have seen them used in arrays [1,2,3,4].each{|x|puts x} ; which sort
of makes sense, but there is another piece in the book that uses the do
end code block on the scan method? p65 at the top. I looked at the ruby
docs for this method and I don't see how you "know" that the code block
can be used at this point.
Thanks for the help
p.s sorry if I just overlooked it...
--
Posted via
http://www.ruby-...
.
1 Answer
Carl Jenkins
8/11/2006 2:14:00 AM
0
> p.s sorry if I just overlooked it...
sorry I did overlook it.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
code block confusion
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