From: murphy Date: 2007-11-11T20:28:06+09:00 Subject: Re: new Enumerable.butfirst method Voroztsov Artem wrote: > Names #take_while and #drop_while make me think that it stops taking > and dropping when block returns false/nil for the first time. isn't that what they do? -------------------------------------------------- Enumerable#drop_while enum.drop_while {|arr| block } => array ------------------------------------------------------------------------ Drops elements up to, but not including, the first element for which the block returns nil or false and returns an array containing the remaining elements. a = [1, 2, 3, 4, 5, 0] a.drop {|i| i < 3 } # => [3, 4, 5, 0] [murphy]