Skip to content

Commit

Permalink
Merge pull request #2020 from ruby/kernel-types
Browse files Browse the repository at this point in the history
Avoid using `instance`/`class` types in modules
  • Loading branch information
soutaro committed Sep 19, 2024
2 parents d89477b + 91d5853 commit 061aa32
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/kernel.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ module Kernel : BasicObject
# 1.class #=> Integer
# self.class #=> Object
#
def class: () -> class
def class: () -> Class

# <!--
# rdoc-file=vm_eval.c
Expand Down Expand Up @@ -2210,7 +2210,7 @@ module Kernel : BasicObject
# s3 = s1.dup #=> #<Klass:0x401c1084>
# s3.foo #=> NoMethodError: undefined method `foo' for #<Klass:0x401c1084>
#
def dup: () -> instance
def dup: () -> self

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

private

def initialize_copy: (instance object) -> self
def initialize_copy: (self object) -> self

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

def initialize_dup: (instance object) -> self
def initialize_dup: (self object) -> self
end

0 comments on commit 061aa32

Please sign in to comment.