aboutsummaryrefslogtreecommitdiffstats
path: root/lib/set.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-17 01:47:28 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-17 01:47:28 +0000
commitf6b9a0feafe9d3f598867cbb5d1a1dbbb8ba91a6 (patch)
tree063bff3bdb4c92482eaafd8bbc79afdbad3ee12d /lib/set.rb
parentec0c0e3da2cb92cc8b9a7c838d08bbcb20aed664 (diff)
downloadruby-f6b9a0feafe9d3f598867cbb5d1a1dbbb8ba91a6.tar.gz
* hash.c: Added docs to explain that #include? and #member? do not
check member equality * lib/set.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/set.rb')
-rw-r--r--lib/set.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/set.rb b/lib/set.rb
index a3f185538f..59d70e82ca 100644
--- a/lib/set.rb
+++ b/lib/set.rb
@@ -208,6 +208,11 @@ class Set
end
# Returns true if the set contains the given object.
+ #
+ # Note that <code>include?</code> and <code>member?</code> do not test member
+ # equality using <code>==</code> as do other Enumerables.
+ #
+ # See also Enumerable#include?
def include?(o)
@hash[o]
end