From: Stefan Rusterholz Date: 2007-10-22T22:24:35+09:00 Subject: Re: Conflicts between using respond_to? and extending Ruby Trans wrote: > respond_to?(:meta, OpenURI::Meta) I'm sorry, but that looks just so wrong to me. Take the case on .each. You don't test if an object respond_to?(:each, Enumerable), you just need the .each. I don't think there's a solution to the problem as you sacrifice one or the other thing. You can't know by the name of a method whether it does what you want or not. So either you jump into the cold water and assume it does or you sacrifice flexibility and test if it's derived from something you know. Regards Stefan -- Posted via http://www.ruby-forum.com/.