On Dec 22, 2007 9:05 PM, Tanaka Akira <akr / fsij.org> wrote:
> In article <cff277eb-6676-4e7b-9523-9f1d733aa55b / c4g2000hsg.googlegroups.com>,
>   Trans <transfire / gmail.com> writes:
>
> > For the other, I take it you did not follow the conversion about this
> > on ruby-talk. The problem is that if someone defines an Object#meta or
> > Kernel#meta extension method it will cause open-uri to bomb. Besides
> > that, open_uri is simply using the #respond_to?  to test to see if its
> > Meta module has been included, so changing it to is_a? is actually
> > more precise to the authors intention.
>
> I intend that open-uri use duck typing.

Akira-san

I did an analysis of this problem when Trans brought it up on
ruby-talk, and wrote about it.

Consider the analysis in my article:

http://talklikeaduck.denhaven2.com/articles/2007/10/22/chicken-typing-isnt-duck-typing

in the section "What's OpenURI Doing?"

I suggest some alternatives which would solve the problem at hand.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/