From: "John W. Long" Date: 2004-06-06T12:59:47+09:00 Subject: Re: How to ducktype a Hash? Duck typing may not be the best thing for you. =) Sorry. Didn't mean to start another thread war on this. -- John Sean O'Dell wrote: >Which always sounded fine to me until I was actually exposed to this kind of >"typing." The problem is, the methods [] and []= are there, they just don't >do what I need them to do. Duck typing completely and utterly don't help, >and Ruby has no way to tell me when an object's [] and []= are hash-like or >something else. My solution is going to end being something like "tagging >all objects that I know in advance to be hash-like, and then looking for that >tag at that particular point in my code." That's a kludge to me. > > Sean O'Dell > >