Method: Array#drop_until

Defined in:
lib/ruby/jruby_hack.rb

#drop_until(&block) ⇒ Array

Drops the longest prefix of elements that do not satisfy the predicate.

Returns:



121
122
123
124
125
126
127
128
# File 'lib/ruby/jruby_hack.rb', line 121

def drop_until(&block)
  # This is in tail call form
  unless empty? or yield(head)
    tail.drop_until(&block)
  else
    self
  end
end