Skip to content

Commit

Permalink
fixing Set signatures
Browse files Browse the repository at this point in the history
* set the same type of generic element as for arrays;
  • Loading branch information
HoneyryderChuck committed Aug 23, 2021
1 parent 8cc07a9 commit 22b9a27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stdlib/json/0/json.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ class Regexp
def to_json: (?JSON::State state) -> String
end

class Set[A]
class Set[unchecked out A]
# Import a JSON Marshalled object.
#
# method used for JSON marshalling support.
Expand Down
5 changes: 2 additions & 3 deletions stdlib/set/0/set.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
#
# - Akinori MUSHA <knu@iDaemons.org> (current maintainer)
#
class Set[A]
class Set[unchecked out A]
include Enumerable[A]
# Creates a new set containing the elements of the given enumerable object.
#
# If a block is given, the elements of enum are preprocessed by the given block.
Expand Down Expand Up @@ -296,8 +297,6 @@ class Set[A]
# Set[1, 'c', :s].to_a #=> [1, "c", :s]
#
def to_a: () -> Array[A]

include Enumerable[A]
end

module Enumerable[unchecked out Elem]
Expand Down

0 comments on commit 22b9a27

Please sign in to comment.