instance method
Prism::Translation::Parser::Compiler#procarg0?
procarg0?(parameters)
lib/prism/translation/parser/compiler.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/parser/compiler.rb, line 1989
def procarg0?(parameters)
parameters &&
parameters.requireds.length == 1 &&
parameters.optionals.empty? &&
parameters.rest.nil? &&
parameters.posts.empty? &&
parameters.keywords.empty? &&
parameters.keyword_rest.nil? &&
parameters.block.nil?
end
Blocks can have a special set of parameters that automatically expand when given arrays if they have a single required parameter and no other parameters.