From: nobu.nokada@... Date: 2004-02-20T20:54:33+09:00 Subject: Re: proposal: let kind_of take more arguments Hi, At Fri, 20 Feb 2004 20:20:09 +0900, Simon Strandgaard wrote in [ruby-talk:93193]: > It could turn into > > def push(choice) > unless choice.kind_of?(Zero, One) > raise "got #{choice.class}" > end > @choices << choice > end unless [Zero, One].any? {|klass| choice.kind_of?(klass)} Or shorter unless [Zero, One].any?(&choice.method(:kind_of?) -- Nobu Nakada