Hi --

On Fri, 25 May 2007, Michael W. Ryder wrote:

> How about something like: return $1 if (v + 1) < 10 if you wanted to return v 
> + 1?  If you wanted to return v you could use: return $2 if ((v) +1) < 10. 
> Improvements would be using some of the regular expression flags to control 
> what $1, $2, etc. refer to.

But $1, $2, ... are already taken.  What would happen here, for
example?

   return $1 if /(abc)/.match("abc")


David

-- 
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
    (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)