1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Minor documentation improvements

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
gsinclair 2003-09-19 07:47:46 +00:00
parent 34ab8c77a1
commit 1469fdd06c

View file

@ -212,7 +212,8 @@ class Set
end
end
# Deletes the given object from the set and returns self.
# Deletes the given object from the set and returns self. Use +subtract+ to
# delete several items at once.
def delete(o)
@hash.delete(o)
self
@ -282,7 +283,7 @@ class Set
alias union | ##
# Returns a new set built by duplicating the set, removing every
# element that appear in the given enumerable object.
# element that appears in the given enumerable object.
def -(enum)
enum.is_a?(Enumerable) or raise ArgumentError, "value must be enumerable"
dup.subtract(enum)