Bug #7540
closedProc#parameters cannot show :opt with :rest and :keyword
Description
When an :opt arg is specified with :rest and :key args,
Proc#parameters (as well as *Method) cannot show it as below:
->(opt = :ion, *rest, key: :word){}.parameters # => [[:rest, :rest], [:key, :key]]
Updated by Eregon (Benoit Daloze) almost 12 years ago
I've started to take a look at this, and I wish to solve it if I find the way.
But of course if I'm taking too much time or somebody solves it before it's fine,
although I would prefer collaborating with them (I suppose mame, as he did r34137).
Updated by Eregon (Benoit Daloze) almost 12 years ago
- Assignee set to Eregon (Benoit Daloze)
Found the fix, just taking time to update related documentation.
no6v: nice catch!
Updated by Eregon (Benoit Daloze) almost 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r38333.
Nobuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- iseq.c (rb_iseq_parameters): fix limit for optional arguments.
- test/ruby/test_keyword.rb: tests for above.
- vm_core.h (struct rb_iseq_struct): update documentation
with keyword arguments. [Bug #7540] [ruby-core:50735]
Updated by no6v (Nobuhiro IMAI) almost 12 years ago
Cool! We are lucky to find this, and then fixed. Thanks :).