From c80e5bf3bc99152dabd86d510a91ef5759caac29 Mon Sep 17 00:00:00 2001 From: ksss Date: Wed, 25 Jun 2025 16:40:07 +0900 Subject: [PATCH 1/4] Add method aliases for `Set` --- core/set.rbs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/core/set.rbs b/core/set.rbs index 87af3ce5c..9d627a899 100644 --- a/core/set.rbs +++ b/core/set.rbs @@ -532,6 +532,13 @@ class Set[unchecked out A] # def subset?: (self) -> bool + # + # + alias <= subset? + # + # + alias < proper_subset? + # + # + alias >= superset? + # + # + alias > proper_superset? + # + # Equivalent to Set#select! + # + alias filter! select! + # + # Returns true if the set will compare its elements by their + # identity. Also see Set#compare_by_identity. + # + def compare_by_identity?: () -> bool + # + # Returns a string created by converting each element of the set to a string + # See also: Array#join + # + def join: (?string separator) -> String end %a{annotate:rdoc:skip} From 080ff6a3526e117fdf925c612f527c933c22deb2 Mon Sep 17 00:00:00 2001 From: ksss Date: Wed, 25 Jun 2025 16:47:05 +0900 Subject: [PATCH 4/4] Add signature for `Set#flatten!` --- core/set.rbs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/set.rbs b/core/set.rbs index 5e6935898..1443f85ce 100644 --- a/core/set.rbs +++ b/core/set.rbs @@ -486,6 +486,15 @@ class Set[unchecked out A] # def flatten: () -> Set[untyped] + # + # Equivalent to Set#flatten, but replaces the receiver with the + # result in place. Returns nil if no modifications were made. + # + def flatten!: () -> self? + #