From: Gavin Sinclair Date: 2004-06-08T01:06:20+09:00 Subject: Re: How to ducktype a Hash? On Tuesday, June 8, 2004, 1:58:44 AM, Robert wrote: >> > Well, you can even view an Array as map like: keys are integers >> > and values whatever you like. >> >> Yeah, but that's a crappy kind of map :) > It depends on how much abstraction you throw in. :-) RAM can be viewed as > this kind of mapping, too... >> That's more like an array :\ > How did you know? You didn't to #kind_of? Array, did you? :-) >> a = [1,2,3,4] => [1, 2, 3, 4] >> def a.kind_of?(klass) true end => nil >> a.kind_of? Hash => true Hey, I think you're onto something. >> a.kind_of? Errno::ENOENT => true Now that's just being silly. Gavin