Ben Giddings wrote: >In Java you could check to see if something is of a certain class, but what >was more often done was to see if something implemented a certain interface. >Implementing an interface was a way of signalling "I declare myself to act >like a duck". And the fact you implemented the interface meant that you had >all the necessary features to act like a duck. You weren't allowed to >implement the interface and then only choose certain duck-like features. > >It seems to me that duck-typing in Ruby should strive for the same thing. >Checking for one method isn't enough, in my opinion. > I agree with Ryan's reply to you. If I only need the one method on the object I'm interacting with -- should that one call not be allowed simply because all of the other methods that I don't need aren't consistent with what it *should* be? -- Chris http://clabs.org/blogki