From: "David A. Black" Date: 2004-06-07T22:27:41+09:00 Subject: Re: How to ducktype a Hash? Hi -- On Mon, 7 Jun 2004, Dave Burt wrote: > param.respond_to? '[]' and > param.respond_to? '[]=' and > !param.kind_of? String and > !param.kind_of? Array That's not duck typing (see Dave's description(s), especially recent clarification that duck typing isn't about checking things) -- also, it would run aground on: class C def [] puts "Hello!" end end I think what we may be running into is the possibility that "ducktyping a Hash" is in a sense a contradiction in terms. David -- David A. Black dblack@wobblini.net