= private = protected
add(o)
Adds the given object to the set and returns self. Use merge to add many elements at once.
Set[1, 2].add(3) #=> #<Set: {1, 2, 3}> Set[1, 2].add([3, 4]) #=> #<Set: {1, 2, [3, 4]}> Set[1, 2].add(2) #=> #<Set: {1, 2}>
# File lib/set.rb, line 348 def add(o) @hash[o] = true self end