From c3eaae90353d8e5a2003e8c6ed97b993d356f440 Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Sat, 29 Aug 2026 18:41:45 +0200 Subject: [PATCH] Handle coreless singleton definitions --- lib/rbs/definition_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rbs/definition_builder.rb b/lib/rbs/definition_builder.rb index 715b417a9..13680f031 100644 --- a/lib/rbs/definition_builder.rb +++ b/lib/rbs/definition_builder.rb @@ -346,7 +346,7 @@ def build_singleton(type_name) if entry.is_a?(Environment::ClassEntry) new_method = definition.methods[:new] - if new_method.defs.all? {|d| d.defined_in == BuiltinNames::Class.name } + if new_method && new_method.defs.all? {|d| d.defined_in == BuiltinNames::Class.name } # The method is _untyped new_. alias_methods = definition.methods.each.with_object([]) do |entry, array|