2010/2/15 John Ydil <john.gendrot / cnsi.fr>: > John Ydil wrote: >> >>> >>> Slowly.... ¨Β βεμιεφ£εαγθίσμιγχααδδεματεασ χεμμ ¨Βχεμμ>>> Can't you just upgrade your Ruby version? ¨Βθασεεννυγθ βεττες >>> option than trying to retrofit all the new behavior on the old >>> version. >>> >>> Kind regards >>> >>> robert >> >> I'll try to upgrade. > > > Unfortunately, the provider doesn't have a newer version of ruby :s module Enumerable def each_slice(num) sl = [] each do |x| sl << x if sl.size == num yield sl sl = [] end end yield sl unless sl.empty? self end end Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/