Ruby Parsing Bug
A parsing bug in ruby 1.9.2 allowed you to pass blocks to methods preceded by a comma. The bug only affected blocks with do/end and was fixed in 1.9.3.
$ rvm use ruby 1.8.7
[1].inject :+, do |x| 1 end
# => SyntaxError: compile error
# => (irb):1: syntax error, unexpected kDO_BLOCK
$ rvm use ruby 1.9.2 # tested on ruby-1.9.2-p290
[1].inject :+, do |x| 1 end
# => 1
[1].inject :+, {|x| 1}
# => SyntaxError: (irb):2: syntax error, unexpected '|', expecting '}'
$ rvm use ruby 1.9.3
[1].inject :+, do |x| 1 end
# => SyntaxError: (irb):1: syntax error, unexpected keyword_do_block
⸺
You can read more by me, follow me on Mastodon or subscribe.

I've just published my book - Build a Database Server. Learn how real databases like PostgreSQL and MySQL work by building your own database from scratch.
Find out more and see a preview.