From: Bill Kelly Date: 2008-05-29T17:18:02+09:00 Subject: Re: The duck's backside From: "Mark Wilden" > > So if I can solve > a programming problem simply by asking what builtin class an object > is, as opposed to seeing if it responds to a certain method name, > knowing nothing about what that method actually does, I'll go with the > former. There are more ducks in heaven and earth, Horatio, than are dreamt of in your philosophy. >> require 'delegate' => true >> x = SimpleDelegator.new(123) => 123 >> x.class => SimpleDelegator >> x.kind_of? Numeric => false >> x.is_a? Numeric => false >> x.respond_to? :to_int => true >> x.to_int => 123 Regards, Bill