Blocks, Procs, and Lambdas

Call Me Maybe

Nice work! Calling a proc with a method isn't too tricky. However, there's an even easier way.

Unlike blocks, we can call procs directly by using Ruby's .call method. Check it out!

test = Proc.new { # does something }
# does that something!

Remember: there's always more than one way to do something in Ruby.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.