Sha256: 4eb40c237b912034fb406433b4d94f167d948c0cf65ef89b6036599ceca1c087

Contents?: true

Size: 281 Bytes

Versions: 10

Compression:

Stored size: 281 Bytes

Contents

class Array

  # In place #merge.
  #
  #   a = [1,2]
  #   a.merge! [2,3]
  #   a => [1,2,3]
  #
  # CREDIT: Trans

  def merge!( other )
    self.replace(self.merge(other))
  end

  # Alias for <tt>|</tt>.
  #
  #   [1,2].merge [2,3]  #=> [1,2,3]
  alias_method :merge, :|

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/array/merge.rb
facets-2.8.3 lib/core/facets/array/merge.rb
facets-2.8.2 lib/core/facets/array/merge.rb
facets-2.8.1 lib/core/facets/array/merge.rb
facets-2.8.0 lib/core/facets/array/merge.rb
facets-2.7.0 lib/core/facets/array/merge.rb
facets-2.6.0 lib/core/facets/array/merge.rb
facets-2.5.1 lib/core/facets/array/merge.rb
facets-2.5.0 lib/core/facets/array/merge.rb
facets-2.5.2 lib/core/facets/array/merge.rb