Method: String#drop
- Defined in:
- lib/ruby/jruby_hack.rb
#drop(n) ⇒ String
Return the string with n characters removed from the front
457 458 459 460 |
# File 'lib/ruby/jruby_hack.rb', line 457 def drop(n) raise ArgumentError, "n must be positive" if n < 0 (length >= n) ? self[n..-1] : "" end |