[ruby-talk:00281] 'case' question

From: "bryce" <thecrow@...>
Date: 1999-04-14 22:01:18 UTC
List: ruby-talk #281
The following code works fine:
  if e.type == BNClicked then
    print "\nGot BNClicked"
  end

but this code, which I thought would be equivalent
does not work.

    case e.type
        when BNClicked
            print "\nGot BNClicked"
    end

Am I missing the reason why?

Thanks.
Bryce

In This Thread

Prev Next