diff --git a/lib/rbs/prototype/rbi.rb b/lib/rbs/prototype/rbi.rb index 169e91042..3180a99e9 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