Misc #10754 ยป patch.diff
| 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?
|
||