From: ts Date: 2003-11-20T19:25:04+09:00 Subject: Re: "stereotyping" (was: Re: Strong Typing (Re: Managing metadata about attribute types) ) >>>>> "S" == Sean O'Dell writes: S> No, type checking based on class inheritance (and mix-ins) is completely S> fine. No, no, matz is right : it's bad Don't forget that I've written and *used* this svg% cat b.rb #!./ruby class A def tt(Enumerable a) p "I respond to #each : #{a.inspect}" end def tt(Kernel a) p "I don't know #each : #{a.inspect}" end end a = A.new a.tt([1, 2]) a.tt("string") a.tt(A.new) svg% svg% b.rb "I respond to #each : [1, 2]" "I respond to #each : \"string\"" "I don't know #each : #" svg% Guy Decoux