Flowdock
replace(enum) public

Replaces the contents of the set with the contents of the given enumerable object and returns self.

set = Set[1, 'c', :s]             #=> #<Set: {1, "c", :s}>
set.replace([1, 2])               #=> #<Set: {1, 2}>
set                               #=> #<Set: {1, 2}>
Show source
Register or log in to add new notes.