Vítor Baptista
2010-04-12 05:10:30
+3
A:
It's because of the interpolation of special variables. \+
will be replaced with "the text matched by the highest-numbered capturing group that actually participated in the match" (See the Special Variables section on http://www.regular-expressions.info/ruby.html)
The block syntax is in fact a fix for this, well done.
miorel
2010-04-12 05:14:38