From: Robert Dober Date: 2011-06-26T02:00:01+09:00 Subject: Re: Symbol#=== On Sat, Jun 25, 2011 at 7:57 AM, Intransition wrote: > As: > >    class Symbol >      def ===(object) >        object.respond_to?(self) >      end >    end > > Then: > >    case foo >    when :some_method >      foo.some_method >    end > > Insanity? No, but too invasive... case my_token when :integer when :identifier when.... thanx for breaking that ;) Furthermore I already feel that Symbol has one of the worst kludges ever conceived cast onto itself, which is #to_proc. On the same account I feel #=== should not be concerned with receiver's methods. Cheers Robert > > -- I'm not against types, but I don't know of any type systems that aren't a complete pain, so I still like dynamic typing. -- Alain Kay