Hi,

At Fri, 27 Sep 2002 07:00:11 +0900,
Mauricio =?unknown-8bit?Q?Fern=E1ndez?= wrote:
> One foolish way I can think of would be the following:
> 
> def do_foo<sort,bar>(b)
> # used when b can respond to sort and bar
> end
> 
> def do_foo<each>(b)
> # when it has method each
> end

What about this? ;)

def do_foo(b {b.respond_to?(:sort) && b.respond_to?(:bar)})
end

-- 
Nobu Nakada