Skip to content

Commit 5c3583e

Browse files
committed
Update
1 parent f38cc30 commit 5c3583e

40 files changed

+497
-525
lines changed

stdlib/builtin/array.rbi

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class Array < Object
1+
class Array[Elem] < Object
22
include Enumerable
33

44
def self.[]: [U] (*U arg0) -> ::Array[U]
@@ -34,7 +34,7 @@ class Array < Object
3434
def collect: [U] () { (Elem arg0) -> U } -> ::Array[U]
3535
| () -> T::Enumerator[Elem]
3636
37-
def combination: (Integer arg0) { (::Array[Elem] arg0) -> BasicObject } -> ::Array[Elem]
37+
def combination: (Integer arg0) { (::Array[Elem] arg0) -> any } -> ::Array[Elem]
3838
| (Integer arg0) -> T::Enumerator[::Array[Elem]]
3939
4040
def compact: () -> ::Array[any]
@@ -45,33 +45,33 @@ class Array < Object
4545
4646
def count: () -> Integer
4747
| (?Elem arg0) -> Integer
48-
| () { (Elem arg0) -> BasicObject } -> Integer
48+
| () { (Elem arg0) -> any } -> Integer
4949
50-
def cycle: (?Integer arg0) { (Elem arg0) -> BasicObject } -> any
50+
def cycle: (?Integer arg0) { (Elem arg0) -> any } -> any
5151
| (?Integer arg0) -> T::Enumerator[Elem]
5252
5353
def delete: (Elem arg0) -> Elem?
5454
| (Elem arg0) { () -> Elem } -> Elem
5555
5656
def delete_at: (Integer arg0) -> Elem?
5757
58-
def delete_if: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
58+
def delete_if: () { (Elem arg0) -> any } -> ::Array[Elem]
5959
| () -> T::Enumerator[Elem]
6060
6161
def difference: (*::Array[any] arrays) -> ::Array[Elem]
6262
6363
def drop: (Integer arg0) -> ::Array[Elem]
6464
65-
def drop_while: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
65+
def drop_while: () { (Elem arg0) -> any } -> ::Array[Elem]
6666
| () -> T::Enumerator[Elem]
6767
6868
def each: () -> T::Enumerator[Elem]
69-
| () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
69+
| () { (Elem arg0) -> any } -> ::Array[Elem]
7070
71-
def each_index: () { (Integer arg0) -> BasicObject } -> ::Array[Elem]
71+
def each_index: () { (Integer arg0) -> any } -> ::Array[Elem]
7272
| () -> T::Enumerator[Elem]
7373
74-
def empty?: () -> T::Boolean
74+
def empty?: () -> bool
7575
7676
def fetch: (Integer arg0) -> Elem
7777
| (Integer arg0, ?Elem arg1) -> Elem
@@ -89,10 +89,10 @@ class Array < Object
8989
9090
def flatten: (?Integer depth) -> ::Array[any]
9191
92-
def `include?`: [U] (U arg0) -> T::Boolean
92+
def `include?`: [U] (U arg0) -> bool
9393
9494
def index: [U] (?U arg0) -> Integer?
95-
| () { (Elem arg0) -> BasicObject } -> Integer?
95+
| () { (Elem arg0) -> any } -> Integer?
9696
| () -> T::Enumerator[Elem]
9797
9898
def initialize: () -> Object
@@ -105,7 +105,7 @@ class Array < Object
105105
106106
def join: (?String arg0) -> String
107107
108-
def keep_if: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
108+
def keep_if: () { (Elem arg0) -> any } -> ::Array[Elem]
109109
110110
def last: () -> Elem?
111111
| (?Integer arg0) -> ::Array[Elem]
@@ -118,10 +118,10 @@ class Array < Object
118118
def map!: [U] () { (Elem arg0) -> U } -> ::Array[U]
119119
| () -> T::Enumerator[Elem]
120120
121-
def member?: (Elem arg0) -> T::Boolean
121+
def member?: (Elem arg0) -> bool
122122
123123
def permutation: (?Integer arg0) -> T::Enumerator[Elem]
124-
| (?Integer arg0) { (::Array[Elem] arg0) -> BasicObject } -> ::Array[Elem]
124+
| (?Integer arg0) { (::Array[Elem] arg0) -> any } -> ::Array[Elem]
125125
126126
def pop: (?Integer arg0) -> ::Array[Elem]
127127
| () -> Elem?
@@ -134,27 +134,27 @@ class Array < Object
134134

135135
def rassoc: [U] (U arg0) -> Elem?
136136

137-
def reject: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
137+
def reject: () { (Elem arg0) -> any } -> ::Array[Elem]
138138
| () -> T::Enumerator[Elem]
139139

140-
def reject!: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
140+
def reject!: () { (Elem arg0) -> any } -> ::Array[Elem]
141141
| () -> T::Enumerator[Elem]
142142

143-
def repeated_combination: (Integer arg0) { (::Array[Elem] arg0) -> BasicObject } -> ::Array[Elem]
143+
def repeated_combination: (Integer arg0) { (::Array[Elem] arg0) -> any } -> ::Array[Elem]
144144
| (Integer arg0) -> T::Enumerator[Elem]
145145

146-
def repeated_permutation: (Integer arg0) { (::Array[Elem] arg0) -> BasicObject } -> ::Array[Elem]
146+
def repeated_permutation: (Integer arg0) { (::Array[Elem] arg0) -> any } -> ::Array[Elem]
147147
| (Integer arg0) -> T::Enumerator[Elem]
148148

149149
def reverse: () -> ::Array[Elem]
150150

151151
def reverse!: () -> ::Array[Elem]
152152

153-
def reverse_each: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
153+
def reverse_each: () { (Elem arg0) -> any } -> ::Array[Elem]
154154
| () -> T::Enumerator[Elem]
155155

156156
def rindex: (?Elem arg0) -> Integer?
157-
| () { (Elem arg0) -> BasicObject } -> Integer?
157+
| () { (Elem arg0) -> any } -> Integer?
158158
| () -> T::Enumerator[Elem]
159159

160160
def rotate: (?Integer arg0) -> ::Array[Elem]
@@ -164,10 +164,10 @@ class Array < Object
164164
def sample: () -> Elem?
165165
| (?Integer arg0) -> ::Array[Elem]
166166

167-
def select: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
167+
def select: () { (Elem arg0) -> any } -> ::Array[Elem]
168168
| () -> T::Enumerator[Elem]
169169

170-
def select!: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
170+
def select!: () { (Elem arg0) -> any } -> ::Array[Elem]
171171
| () -> T::Enumerator[Elem]
172172

173173
def shift: () -> Elem?
@@ -192,7 +192,7 @@ class Array < Object
192192

193193
def take: (Integer arg0) -> ::Array[Elem]
194194

195-
def take_while: () { (Elem arg0) -> BasicObject } -> ::Array[Elem]
195+
def take_while: () { (Elem arg0) -> any } -> ::Array[Elem]
196196
| () -> T::Enumerator[Elem]
197197

198198
def to_a: () -> ::Array[Elem]
@@ -228,5 +228,3 @@ class Array < Object
228228

229229
def to_s: () -> String
230230
end
231-
232-
Array::Elem: any

stdlib/builtin/basic_object.rbi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
class BasicObject
2-
def !: () -> T::Boolean
2+
def !: () -> bool
33

4-
def !=: (BasicObject other) -> T::Boolean
4+
def !=: (any other) -> bool
55

6-
def ==: (BasicObject other) -> T::Boolean
6+
def ==: (any other) -> bool
77

88
def __id__: () -> Integer
99

10-
def __send__: (Symbol arg0, *BasicObject arg1) -> any
10+
def __send__: (Symbol arg0, *any arg1) -> any
1111

12-
def equal?: (BasicObject other) -> T::Boolean
12+
def equal?: (any other) -> bool
1313

1414
def instance_eval: (?String arg0, ?String filename, ?Integer lineno) -> any
1515
| [U] () { () -> U } -> U

stdlib/builtin/class.rbi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Class < Module
55

66
def inherited: (Class arg0) -> any
77

8-
def instance_methods: (?T::Boolean arg0) -> ::Array[Symbol]
8+
def instance_methods: (?bool arg0) -> ::Array[Symbol]
99

1010
def name: () -> String?
1111

@@ -14,6 +14,6 @@ class Class < Module
1414

1515
def initialize: () -> void
1616
| (?Class superclass) -> void
17-
| () { (Class arg0) -> BasicObject } -> void
18-
| (?Class superclass) { (Class arg0) -> BasicObject } -> void
17+
| () { (Class arg0) -> any } -> void
18+
| (?Class superclass) { (Class arg0) -> any } -> void
1919
end

stdlib/builtin/comparable.rbi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module Comparable
2-
def <: (any other) -> T::Boolean
2+
def <: (any other) -> bool
33

4-
def <=: (any other) -> T::Boolean
4+
def <=: (any other) -> bool
55

6-
def ==: (any other) -> T::Boolean
6+
def ==: (any other) -> bool
77

8-
def >: (any other) -> T::Boolean
8+
def >: (any other) -> bool
99

10-
def >=: (any other) -> T::Boolean
10+
def >=: (any other) -> bool
1111

12-
def between?: (any min, any max) -> T::Boolean
12+
def between?: (any min, any max) -> bool
1313

1414
def clamp: (any min, any max) -> any
1515
end

stdlib/builtin/complex.rbi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Complex < Numeric
3333
| (BigDecimal arg0) -> Complex
3434
| (Complex arg0) -> Complex
3535

36-
def ==: (Object arg0) -> T::Boolean
36+
def ==: (Object arg0) -> bool
3737

3838
def abs: () -> Numeric
3939

@@ -51,9 +51,9 @@ class Complex < Numeric
5151

5252
def denominator: () -> Integer
5353

54-
def eql?: (Object arg0) -> T::Boolean
54+
def eql?: (Object arg0) -> bool
5555

56-
def equal?: (Object arg0) -> T::Boolean
56+
def equal?: (Object arg0) -> bool
5757

5858
def fdiv: (Numeric arg0) -> Complex
5959

@@ -100,7 +100,7 @@ class Complex < Numeric
100100

101101
def to_s: () -> String
102102

103-
def zero?: () -> T::Boolean
103+
def zero?: () -> bool
104104
end
105105

106106
Complex::I: Complex

stdlib/builtin/dir.rbi

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class Dir < Object
1+
class Dir[Elem] < Object
22
include Enumerable
33

44
def self.chdir: (?String | Pathname arg0) -> Integer
@@ -10,15 +10,15 @@ class Dir < Object
1010

1111
def self.entries: (String arg0, ?Encoding arg1) -> ::Array[String]
1212

13-
def self.exist?: (String file) -> T::Boolean
13+
def self.exist?: (String file) -> bool
1414

15-
def self.foreach: (String dir, ?Encoding arg0) { (String arg0) -> BasicObject } -> NilClass
15+
def self.foreach: (String dir, ?Encoding arg0) { (String arg0) -> any } -> NilClass
1616
| (String dir, ?Encoding arg0) -> T::Enumerator[String]
1717

1818
def self.getwd: () -> String
1919

2020
def self.glob: (String | ::Array[String] pattern, ?Integer flags) -> ::Array[String]
21-
| (String | ::Array[String] pattern, ?Integer flags) { (String arg0) -> BasicObject } -> NilClass
21+
| (String | ::Array[String] pattern, ?Integer flags) { (String arg0) -> any } -> NilClass
2222

2323
def self.home: (?String arg0) -> String
2424

@@ -35,7 +35,7 @@ class Dir < Object
3535

3636
def close: () -> NilClass
3737

38-
def each: () { (String arg0) -> BasicObject } -> self
38+
def each: () { (String arg0) -> any } -> self
3939
| () -> T::Enumerator[String]
4040

4141
def fileno: () -> Integer
@@ -61,7 +61,5 @@ class Dir < Object
6161
def to_path: () -> String?
6262

6363
def self.[]: (String | ::Array[String] pattern, ?Integer flags) -> ::Array[String]
64-
| (String | ::Array[String] pattern, ?Integer flags) { (String arg0) -> BasicObject } -> NilClass
64+
| (String | ::Array[String] pattern, ?Integer flags) { (String arg0) -> any } -> NilClass
6565
end
66-
67-
Dir::Elem: any

stdlib/builtin/encoding.rbi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Encoding < Object
22
def self.aliases: () -> ::Hash[String, String]
33

4-
def self.compatible?: (BasicObject obj1, BasicObject obj2) -> Encoding?
4+
def self.compatible?: (any obj1, any obj2) -> Encoding?
55

66
def self.default_external: () -> Encoding
77

@@ -19,9 +19,9 @@ class Encoding < Object
1919

2020
def self.name_list: () -> ::Array[String]
2121

22-
def ascii_compatible?: () -> T::Boolean
22+
def ascii_compatible?: () -> bool
2323

24-
def dummy?: () -> T::Boolean
24+
def dummy?: () -> bool
2525

2626
def inspect: () -> String
2727

0 commit comments

Comments
 (0)