From 373a21fecde4cde0150346c98980599bc0acae5a Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Tue, 3 Oct 2023 19:41:34 +0900 Subject: [PATCH] core: Update signature for Module.define_method Inside the block for `Module.define_method` is evaluated as a instance method. So its self-types should be an instance of the Module. --- core/module.rbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/module.rbs b/core/module.rbs index a73452637..e8066afd4 100644 --- a/core/module.rbs +++ b/core/module.rbs @@ -726,8 +726,8 @@ class Module < Object # I'm Dino! # # # - def define_method: (interned symbol, Proc | Method | UnboundMethod method) -> Symbol - | (interned symbol) { () -> untyped } -> Symbol + def define_method: (interned symbol, ^() [self: instance] -> untyped | Method | UnboundMethod method) -> Symbol + | (interned symbol) { () [self: instance] -> untyped } -> Symbol #