mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
[DOC] Update Set#subset? documentation
This commit is contained in:
1 parent
426899ea64
commit
e4a403ebd7
1 file changed
+10
-2
Notes:
git
2026-07-02 06:55:41 +00:00
Merged: https://github.com/ruby/ruby/pull/17605 Merged-By: jeremyevans <code@jeremyevans.net>
@@ -1883,9 +1883,17 @@ set_i_proper_subset(VALUE set, VALUE other)
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* subset?(set) -> true or false
|
||||
* subset?(other_set) -> true or false
|
||||
*
|
||||
* Returns true if the set is a subset of the given set.
|
||||
* Returns whether +self+ is a {subset}[https://en.wikipedia.org/wiki/Subset]
|
||||
* of the given +other_set+:
|
||||
*
|
||||
* set = Set[*'b'..'e']
|
||||
* set.subset?(set) # => true
|
||||
* set.subset?(Set[*'a'..'f']) # => true
|
||||
* set.subset?(Set[*'c'..'e']) # => false
|
||||
*
|
||||
* Related: {Methods for Querying}[rdoc-ref:Set@Methods+for+Querying].
|
||||
*/
|
||||
static VALUE
|
||||
set_i_subset(VALUE set, VALUE other)
|
||||
|
||||
Reference in new issue
Block a user