From: Sam Roberts Date: 2004-03-19T01:34:51+09:00 Subject: Re: Thinking about a date-matching algorithm... Wrote Josh_Neland@Dell.com, on Fri, Mar 19, 2004 at 12:52:14AM +0900: > Why not just provide a each_before(stop_time) {block} method? When I want to: - know if a time exists satisfying a condition with each(), I can call Enumerabe.detect { cond...} with each_before(stop_time) I have to implement Enumeralbe.detect myself - get all times within a period with each(), I can call Enumerable.find_all { cond.. } with each_before(stop_time) I have to implement Enumerable.find_all myself ... You can build any kind of each_x_y() you want, but you don't get the utilities from the Enumerable mixin when you do so. Sam -- Sam Roberts