Article

A closure’s a closure, unless it’s a block. Or a proc. Or a lambda.

The other night at our monthly RUM (Ruby Users of Minnesota) Meeting, Paul Cantrell gave a talk/magic show about closures in Ruby. Basically, a closure is a block of code that you can pass around as a value, and always refers back to its original context when executed. Unfortunately, Ruby has a bunch of constructs that look/act like closures, but aren’t exactly closures.

Paul made the discussion really interesting, and I learned a ton. He has posted some notes from his talk; go check them out!

Comments (No comments)

There are no comments for this post so far.

Post a comment