[DOC] Tweaks for Hash#include?

This commit is contained in:
BurdetteLamar 2025-02-22 10:38:27 -06:00 committed by Peter Zhu
parent 0615df2a84
commit 8749a131ce
Notes: git 2025-02-25 00:27:57 +00:00

11
hash.c
View File

@ -3693,11 +3693,14 @@ rb_hash_values(VALUE hash)
/*
* call-seq:
* include?(key) -> true or false
* has_key?(key) -> true or false
* key?(key) -> true or false
* member?(key) -> true or false
*
* Returns +true+ if +key+ is a key in +self+, otherwise +false+.
* Returns whether +key+ is a key in +self+:
*
* h = {foo: 0, bar: 1, baz: 2}
* h.include?(:bar) # => true
* h.include?(:BAR) # => false
*
* Related: {Methods for Querying}[rdoc-ref:Hash@Methods+for+Querying].
*/
VALUE