Method: Array#drop
- Defined in:
- lib/ruby/jruby_hack.rb
#drop(n) ⇒ Array
Select all elements except the first n ones.
71 72 73 74 |
# File 'lib/ruby/jruby_hack.rb', line 71 def drop(n) raise ArgumentError, "n cannot be negative" if n < 0 slice(n..-1) or [] end |