Sha256: 5e486f0d9aff9a50d5ea6de4024e24cb8a42f8dde204c8c0753a2ba9437d70cf

Contents?: true

Size: 173 Bytes

Versions: 30

Compression:

Stored size: 173 Bytes

Contents

class Set
  def &(enum)
    n = self.class.new
    enum.each { |o| n.add(o) if include?(o) }
    n
  end
  alias intersection &
end unless Set.method_defined? :intersection

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
hyper-model-1.0.alpha1.8 lib/opal/set_patches.rb
hyper-model-1.0.alpha1.7 lib/opal/set_patches.rb
hyper-model-1.0.alpha1.6 lib/opal/set_patches.rb
hyper-model-1.0.alpha1.5 lib/opal/set_patches.rb
hyper-model-1.0.alpha1.4 lib/opal/set_patches.rb
hyper-model-0.99.6 lib/opal/set_patches.rb
hyper-model-1.0.alpha1.3 lib/opal/set_patches.rb
hyper-model-0.99.5 lib/opal/set_patches.rb
hyper-model-0.99.4 lib/opal/set_patches.rb
hyper-model-1.0.alpha1.2 lib/opal/set_patches.rb
hyper-model-1.0.alpha1.1 lib/opal/set_patches.rb
hyper-model-1.0.alpha1 lib/opal/set_patches.rb
hyper-model-0.99.3 lib/opal/set_patches.rb
hyper-model-0.99.2 lib/opal/set_patches.rb
hyper-model-0.99.1 lib/opal/set_patches.rb
hyper-model-0.99.0 lib/opal/set_patches.rb
hyper-mesh-1.0.0.lap28 lib/opal/set_patches.rb
hyper-mesh-1.0.0.lap27 lib/opal/set_patches.rb
hyper-mesh-1.0.0.lap26 lib/opal/set_patches.rb
hyper-mesh-1.0.0.lap25 lib/opal/set_patches.rb