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

redefine superclass in Object as always returning a class #1799

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions core/basic_object.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,6 @@ class BasicObject
# Undefining one
#
def singleton_method_undefined: (Symbol name) -> nil

def self.superclass -> nil
end
2 changes: 1 addition & 1 deletion core/class.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,5 @@ class Class < Module
#
# BasicObject.superclass #=> nil
#
def superclass: () -> Class?
# def superclass: () -> Class?
end
2 changes: 2 additions & 0 deletions core/object.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
#
class Object < BasicObject
include Kernel

def self.superclass() -> Class
end

# A previous incarnation of `interned` for backward-compatibility (see #1499)
Expand Down
Loading