On 2002.05.19, Michael Campbell <michael_s_campbell / yahoo.com> wrote:
> 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.

Well, what would be _cool_ is if the "if" worked like this:

    if matched, x, y = str.match /(.)(.)/   # boobies!  sorry, couldn't resist
      puts "we matched."
    else
      puts "we didn't match."
    end

Of course, matched would be an instance of either TrueClass or
FalseClass ... ;-)

-- Dossy

-- 
Dossy Shiobara                       mail: dossy / panoptic.com 
Panoptic Computer Network             web: http://www.panoptic.com/ 
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)