From: Jean-Hugues ROBERT Date: 2004-04-16T20:30:40+09:00 Subject: Re: Hash, ==, key-value comparison I tend to think about == as "has the same value as". So == is rather strong. I like it this way, so I would rather stick with the exiting scheme. OTOH I agree that the default value/proc is easy to miss. Yet, maybe some other operator could do the job, something like ~= if available ? Jean-Hugues At 02:30 16/04/2004 +0900, you wrote: > > On Fri, Apr 16, 2004 at 02:04:10AM +0900, walter@mwsewall.com wrote: > > > Ok, > > ALthough the docs don't mention it, Hash comparison using == > > checks > not only the key value pairs, but also the default value / > > default > procs. > > So how does one compare 2 hashes key-value pairs. > > I can see that it > > > > I can contribute a patch to: > > > > * Change '==' method to compare only key-value pairs. > > * Add Hash#=== method to act like current Hash#== > > > > Comments? > > > >Personally, I like the idea. You get my vote! > > > Regards, > > -- > > University of Athens I bet the human brain > > Physics Department is a kludge --Marvin Minsky > > > > > > > > >Thanks, > > >Walt >***************************************************** >Walter Szewelanczyk >IS Director >M.W. Sewall & CO. email : walter@mwsewall.com >259 Front St. Phone : (207) 442-7994 x 128 >Bath, ME 04530 Fax : (207) 443-6284 >***************************************************** > > >Bath, ME 04530 Fax : (207) 443-6284 >***************************************************** ------------------------------------------------------------------------- Web: http://hdl.handle.net/1030.37/1.1 Phone: +33 (0) 4 92 27 74 17