From 1c692e4be1fbe895328fa4aa5f6a48efaf387c36 Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Sat, 29 Aug 2026 18:42:34 +0200 Subject: [PATCH] Preserve required RBI keyword parameters --- lib/rbs/prototype/rbi.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rbs/prototype/rbi.rb b/lib/rbs/prototype/rbi.rb index 169e910422..3180a99e9b 100644 --- a/lib/rbs/prototype/rbi.rb +++ b/lib/rbs/prototype/rbi.rb @@ -549,10 +549,10 @@ def parse_params(args_node, args, method_type, variables:, overloads:) while kw name, value = kw.children[0].children if (type = vars[name]) - if value - optional_keywords[name] = Types::Function::Param.new(type: type, name: name) - else + if value.nil? || value == :NODE_SPECIAL_REQUIRED_KEYWORD required_keywords[name] = Types::Function::Param.new(type: type, name: name) + else + optional_keywords[name] = Types::Function::Param.new(type: type, name: name) end end