> Look on the bright side:
> 
>   str = gets
>   matched, x, y = str.match /^\s*(\S+)\s+(\S+)\s*$/
>   if matched
>     puts "You typed the words #{x} and #{y}."
>   else
>     puts "You didn't type two separate words."
>   end
> 
> and such.  The MatchData object really isn't such a bad thing :-)

No more "bad thing" than necessary though.

YOu could just as easily check "x" or "y" instead of "matched" in
your above snippet.

I'm probably in the minority and I'm ok with that, but #match
matching n things but returning n+1 values breaks MY worldview of
"least astonishment".

Then again, I've come from a perl background, so maybe my worldview
needs adjusting.


=====
--
Yahoo IM: michael_s_campbell

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com