Skip to content

Commit 8749a13

Browse files
BurdetteLamarpeterzhu2118
authored andcommitted
[DOC] Tweaks for Hash#include?
1 parent 0615df2 commit 8749a13

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

hash.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3693,11 +3693,14 @@ rb_hash_values(VALUE hash)
36933693
/*
36943694
* call-seq:
36953695
* include?(key) -> true or false
3696-
* has_key?(key) -> true or false
3697-
* key?(key) -> true or false
3698-
* member?(key) -> true or false
36993696
*
3700-
* Returns +true+ if +key+ is a key in +self+, otherwise +false+.
3697+
* Returns whether +key+ is a key in +self+:
3698+
*
3699+
* h = {foo: 0, bar: 1, baz: 2}
3700+
* h.include?(:bar) # => true
3701+
* h.include?(:BAR) # => false
3702+
*
3703+
* Related: {Methods for Querying}[rdoc-ref:Hash@Methods+for+Querying].
37013704
*/
37023705

37033706
VALUE

0 commit comments

Comments
 (0)