On Mar 1, 2007, at 5:22 PM, Gary Wright wrote: > On Mar 1, 2007, at 5:30 PM, James Edward Gray II wrote: > >> I would check for to_hash(), then call that method on the argument >> to get its Hash representation. >> > > That might work but what if the object is an interface to some sort > of database? You don't > really want to convert the external data structure into a Hash just > to access a single item. OK, what about using Hash#fetch and trapping the IndexError for an invalid key? James Edward Gray II