core/set.rbs in rbs-3.5.0.pre.2 vs core/set.rbs in rbs-3.5.0
- old
+ new
@@ -413,11 +413,11 @@
# - reject!(&block)
# -->
# Equivalent to Set#delete_if, but returns nil if no changes were
# made. Returns an enumerator if no block is given.
#
- def reject!: () { (A) -> untyped } -> self
+ def reject!: () { (A) -> untyped } -> self?
# <!--
# rdoc-file=lib/set.rb
# - compare_by_identity()
# -->
@@ -435,11 +435,11 @@
# Set[1, 2, 3].disjoint? Set[3, 4] #=> false
# Set[1, 2, 3].disjoint? Set[4, 5] #=> true
# Set[1, 2, 3].disjoint? [3, 4] #=> false
# Set[1, 2, 3].disjoint? 4..5 #=> true
#
- def disjoint?: (_Each[A]) -> bool
+ def disjoint?: (Set[A] | Enumerable[A]) -> bool
# <!--
# rdoc-file=lib/set.rb
# - divide(&func)
# -->
@@ -456,12 +456,12 @@
# # #<Set: {3, 4}>,
# # #<Set: {6}>}>
#
# Returns an enumerator if no block is given.
#
- def divide: () { (A, A) -> untyped } -> Set[self]
- | () { (A) -> untyped } -> Set[self]
+ def divide: () { (A, A) -> Hash::_Key } -> Set[self]
+ | () { (A) -> Hash::_Key } -> Set[self]
# <!--
# rdoc-file=lib/set.rb
# - each(&block)
# -->
@@ -498,11 +498,11 @@
# Set[1, 2, 3].intersect? Set[4, 5] #=> false
# Set[1, 2, 3].intersect? Set[3, 4] #=> true
# Set[1, 2, 3].intersect? 4..5 #=> false
# Set[1, 2, 3].intersect? [3, 4] #=> true
#
- def intersect?: (_Each[A]) -> bool
+ def intersect?: (Set[A] | Enumerable[A]) -> bool
# <!--
# rdoc-file=lib/set.rb
# - keep_if() { |o| ... }
# -->
@@ -532,20 +532,26 @@
# - merge(*enums, **nil)
# -->
# Merges the elements of the given enumerable objects to the set and
# returns self.
#
- def merge: (_Each[A]) -> self
+ def merge: (*_Each[A]) -> self
# <!--
# rdoc-file=lib/set.rb
# - subset?(set)
# -->
# Returns true if the set is a subset of the given set.
#
def subset?: (self) -> bool
- def proper_subst?: (self) -> bool
+ # <!--
+ # rdoc-file=lib/set.rb
+ # - proper_subset?(set)
+ # -->
+ # Returns true if the set is a proper subset of the given set.
+ #
+ def proper_subset?: (self) -> bool
# <!--
# rdoc-file=lib/set.rb
# - superset?(set)
# -->