enum.drop_while { |arr| block } â array
enum.drop_while â an_enumerator
enum.drop_while â an_enumerator
Instance Public methods
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.
If no block is given, an enumerator is returned instead.
a = [1, 2, 3, 4, 5, 0] a.drop_while { |i| i < 3 } #=> [3, 4, 5, 0]
Please login to continue.