Skip to content

Commit 061aa32

Browse files
authored
Merge pull request #2020 from ruby/kernel-types
Avoid using `instance`/`class` types in modules
2 parents d89477b + 91d5853 commit 061aa32

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/kernel.rbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ module Kernel : BasicObject
282282
# 1.class #=> Integer
283283
# self.class #=> Object
284284
#
285-
def class: () -> class
285+
def class: () -> Class
286286

287287
# <!--
288288
# rdoc-file=vm_eval.c
@@ -2210,7 +2210,7 @@ module Kernel : BasicObject
22102210
# s3 = s1.dup #=> #<Klass:0x401c1084>
22112211
# s3.foo #=> NoMethodError: undefined method `foo' for #<Klass:0x401c1084>
22122212
#
2213-
def dup: () -> instance
2213+
def dup: () -> self
22142214

22152215
# <!-- rdoc-file=enumerator.c -->
22162216
# Creates a new Enumerator which will enumerate by calling `method` on `obj`,
@@ -2956,9 +2956,9 @@ module Kernel : BasicObject
29562956

29572957
private
29582958

2959-
def initialize_copy: (instance object) -> self
2959+
def initialize_copy: (self object) -> self
29602960

2961-
def initialize_clone: (instance object, ?freeze: bool?) -> self
2961+
def initialize_clone: (self object, ?freeze: bool?) -> self
29622962

2963-
def initialize_dup: (instance object) -> self
2963+
def initialize_dup: (self object) -> self
29642964
end

0 commit comments

Comments
 (0)