Skip to content

Proc.parameters return an empty array #2489

@blanquer

Description

@blanquer

Invoking the .parameters method of a Proc seems to return an empty array, rather than the parameters definition.

Repro steps:

p = Proc.new do |arg1: |
  puts arg1
end

puts "Params: #{p.parameters.inspect}"

Using ruby 2.2.0: (and it is the same for 2.1.x)

Params: [[:keyreq, :arg1]]

Using Jruby-head (ruby9000) as of today:

Params: []

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions