From: Mark Hubbart Date: 2004-04-25T05:11:13+09:00 Subject: Re: find a best version (of a package) On Apr 24, 2004, at 12:01 PM, saiph wrote: > > i found very good your advices! > > <- snip -> > inject{|a,b| a.newer?(b) ? b : a } > <- snip -> > > it s, i think, inject{|a,b| a.newer?(b) ? a : b } Ahh, yes :) #newer? is a bit ambiguous, and I got mixed up as to whether (a.newer? b == true) meant that a was newer or b was :) Actually, I'd prefer a compare here, a modified version of <=> that takes numbers into account. That would remove nay ambiguity. cheers, --Mark > > > tnx again. > > -- >> here are more things in heaven and earth, > horatio, than are dreamt of in your philosophy. >