Proc, the object-y twin of the syntax-level block, is the subject of a controversial change in Ruby 1.9: the addition of a new literal.
It’s here to stay. Let’s play a bit, shall we?
While we still have Kernel#lambda, in Ruby 1.9 the parser now accepts a literal that looks like the following (to support some great new features such as default arguments and associated blocks):
Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago