From: Sean O'Dell Date: 2004-06-13T02:30:38+09:00 Subject: Re: How to ducktype a Hash? On Saturday 12 June 2004 04:23, Rene van Bevern wrote: > Sean O'Dell wrote: > > So, how do I positively identify when an object is a hash or at least > > behaves like a hash? > > Use the method #to_hash instead. All hash-like objects should be able to > give a hash-representation of themselves. Not necessarily. A database abstraction might act like a hash, but wouldn't dump entire tables, which could contain tens of thousands of records, as one big Ruby hash. That isn't positive identification. Sean O'Dell