From: Mark Volkmann Date: 2006-01-20T04:40:14+09:00 Subject: Re: My Thought on the "Pickaxe book" (from a Ruby novice) On 1/19/06, James Edward Gray II wrote: > On Jan 19, 2006, at 12:40 PM, Mark Volkmann wrote: > > > For example, in the Hash class, has_key? = include? = key? = member? > > When I see include? and member? it's not immediately obvious to me > > whether they test whether a given object is present as a key or a > > value. has_key? and key? are more clear and I don't see a benefit to > > having both of them. > > That's interesting. I always use include?() so it doesn't matter if > I'm dealing with a Hash or an Array. ;) That's a good argument for using include? instead of the other possibilities. > I am sure glad we can both have it our way. Since you've convinced me of the benefit of your way, I'll make that my way too. -- R. Mark Volkmann Partner, Object Computing, Inc.