About Ruby Versions

I used Ruby 2.2.X to develop the examples. Ruby 1.9.X and 2.X should have no problems. Earlier versions of Ruby have confusing behavior with regard to Procs that was fixed in later versions. Before you start, make sure you have an appropriate version of Ruby installed.

Get Mastering Ruby Closures now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.