From: Austin Ziegler Date: 2004-06-08T02:09:42+09:00 Subject: Re: How to ducktype a Hash? Sean O'Dell [mailto:sean@celsoft.com] : > On Monday 07 June 2004 07:40, Austin Ziegler wrote: >> Sean O'Dell [mailto:sean@celsoft.com]: >>> On Sunday 06 June 2004 05:38, Kristof Bastiaensen wrote: >>>> Hm, just an idea, but perhaps is tagging not such an ugly >>>> solution? You could create a dummy module Hashlike, include it >>>> in your hashlike classes, and test with obj.is_a? Hashlike or >>>> obj.is_a? Hash >>> It's a decent solution, I think. My only complaint is that I >>> have to hack it in, instead of the solution being something Ruby >>> does automatically for all classes. >> Then perhaps the way that you're looking at the solution isn't >> sufficiently "Ruby." > Or perhaps it's very Ruby and you don't realize it. Could be. Your description of the problem/solution space suggests otherwise. This could be a problem with your description, rather than your solution, though. -austin -- austin ziegler * austin.ziegler@evault.com