Project

General

Profile

Misc #10754 ยป patch.diff

ismael (Ismael Abreu), 01/18/2015 01:18 AM

View differences:

lib/set.rb
# If a block is given, the elements of enum are preprocessed by the
# given block.
def initialize(enum = nil, &block) # :yields: o
@hash ||= Hash.new
@hash ||= Hash.new(false)
enum.nil? and return
......
# Returns true if the set contains the given object.
def include?(o)
@hash.include?(o)
@hash[o]
end
alias member? include?
    (1-1/1)