Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array: fix int vs Integer #433

Merged
merged 1 commit into from
Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stdlib/builtin/array.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ class Array[unchecked out Elem] < Object
#
def fetch: (int index) -> Elem
| [T] (int index, T default) -> (Elem | T)
| [T] (::Integer index) { (::Integer index) -> T } -> (Elem | T)
| [T] (int index) { (int index) -> T } -> (Elem | T)

# The first three forms set the selected elements of `self` (which may be the
# entire array) to `obj`.
Expand Down Expand Up @@ -1352,8 +1352,8 @@ class Array[unchecked out Elem] < Object
# a.permutation(0).to_a #=> [[]] # one permutation of length 0
# a.permutation(4).to_a #=> [] # no permutations of length 4
#
def permutation: (?::Integer n) -> ::Enumerator[::Array[Elem], ::Array[Elem]]
| (?::Integer n) { (::Array[Elem] p) -> void } -> ::Array[Elem]
def permutation: (?int n) -> ::Enumerator[::Array[Elem], ::Array[Elem]]
| (?int n) { (::Array[Elem] p) -> void } -> ::Array[Elem]

# Removes the last element from `self` and returns it, or `nil` if the array is
# empty.
Expand Down