A small difference between 1.9.2 and 1.9.3
January 25th, 2012
I was looking at moving an application to ruby 1.9.3 and was getting some strange syntax errors along the lines of "syntax error, unexpected keyword_do_block" on code that was working fine on 1.9.2. I spend quite a few minutes staring at the code which looked completely benign.
It turns out the ruby 1.9.2 is a bit too permissive: it allows you to write an extra comma after your argument list but before the do that marks the start of your block.
some_method arg1, arg2, do ... end
ruby 1.9.3 on the other hand won't accept this.
Leave a Reply