http://dev.rubyonrails.org/ticket/9746 I''ve added a patch and tests for some core extensions for Range. (5..10).overlaps?(3..6) #=> true (5..10).include?(3..6) #=> false (5..10).include?(6..9) #=> true These really come in handy when you''re working with time ranges. :-) The patch also adds support for #step without a block, which will just return an array: (0..60).step(15) #=> [0,15,30,45,60] Add your +1''s if you think it is a worthy patch. Thanks, Brandon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
+1 Totally useful On 10/1/07, Brandon Keepers <bkeepers@gmail.com> wrote:> > > http://dev.rubyonrails.org/ticket/9746 > > I''ve added a patch and tests for some core extensions for Range. > > (5..10).overlaps?(3..6) #=> true > (5..10).include?(3..6) #=> false > (5..10).include?(6..9) #=> true > > These really come in handy when you''re working with time ranges. :-) > > The patch also adds support for #step without a block, which will > just return an array: > > (0..60).step(15) #=> [0,15,30,45,60] > > Add your +1''s if you think it is a worthy patch. > > Thanks, > Brandon > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Oct 1, 2007, at 4:33 PM, Piyush Ranjan wrote:> +1 > Totally usefulWant to add that to the ticket? ;)> On 10/1/07, Brandon Keepers <bkeepers@gmail.com> wrote: > > http://dev.rubyonrails.org/ticket/9746 >Brandon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---