Sha256: 429a1fa88fdd86074318ec80b05f63d5698fc72f95cb14cdd03f530e2307419d

Contents?: true

Size: 236 Bytes

Versions: 3

Compression:

Stored size: 236 Bytes

Contents

class Array
  # Alias for pop, which removes and returns
  # the last element in an array.
  #
  #   require 'facet/array/last'
  #
  #   a = [1,2]
  #   a.last! 3
  #   p a           #=> [1,2,3]
  #  
  alias_method( :last!, :pop)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-0.7.0 lib/facet/array/last%21.rb
facets-0.7.1 lib/facet/array/last%21.rb
facets-0.7.2 lib/facet/array/last%21.rb