Sha256: 05918b0e14674f4d6dfba9cc4dcd616521ba2d27e9ddf2c2e9c397add30c16e5

Contents?: true

Size: 282 Bytes

Versions: 7

Compression:

Stored size: 282 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

7 entries across 7 versions & 2 rubygems

Version Path
facets-2.4.0 lib/facets/array/merge.rb
facets-2.4.1 lib/facets/array/merge.rb
facets-2.4.3 lib/core/facets/array/merge.rb
facets-2.4.2 lib/core/facets/array/merge.rb
facets-2.4.4 lib/core/facets/array/merge.rb
facets-2.4.5 lib/core/facets/array/merge.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/array/merge.rb