convert yield to proc

T

ts

Z> I don't quite understand all this distinction between Proc and proc and the
Z> like.

Well,

def xx(&block)
end

can be seen equivalent to

def xx
block = Proc.allocate if block_given?
end

except that ruby has undef'ed Proc::allocate :)
Z> x(&b) call, in ruby 1.9?

[ruby-core:2583] will give you more information

http://blade.nagaokaut.ac.jp/ruby/ruby-core/2583


Guy Decoux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,145
Messages
2,570,825
Members
47,371
Latest member
Brkaa

Latest Threads

Top