Forum: Ruby-core [ruby-trunk - Bug #7540][Open] Proc#parameters cannot show :opt with :rest and :keyword

Posted by no6v (Nobuhiro IMAI) (Guest)
on 2012-12-10 15:45
(Received via mailing list)
Issue #7540 has been reported by no6v (Nobuhiro IMAI).

----------------------------------------
Bug #7540: Proc#parameters cannot show :opt with :rest and :keyword
https://bugs.ruby-lang.org/issues/7540

Author: no6v (Nobuhiro IMAI)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version:
ruby -v: ruby 2.0.0dev (2012-12-10 trunk 38297) [x86_64-linux]


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]]
Posted by Eregon (Benoit Daloze) (Guest)
on 2012-12-11 01:58
(Received via mailing list)
Issue #7540 has been updated by Eregon (Benoit Daloze).


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).
----------------------------------------
Bug #7540: Proc#parameters cannot show :opt with :rest and :keyword
https://bugs.ruby-lang.org/issues/7540#change-34595

Author: no6v (Nobuhiro IMAI)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version:
ruby -v: ruby 2.0.0dev (2012-12-10 trunk 38297) [x86_64-linux]


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]]
Posted by Eregon (Benoit Daloze) (Guest)
on 2012-12-11 18:05
(Received via mailing list)
Issue #7540 has been updated by Eregon (Benoit Daloze).

Assignee set to Eregon (Benoit Daloze)

Found the fix, just taking time to update related documentation.

no6v: nice catch!
----------------------------------------
Bug #7540: Proc#parameters cannot show :opt with :rest and :keyword
https://bugs.ruby-lang.org/issues/7540#change-34628

Author: no6v (Nobuhiro IMAI)
Status: Open
Priority: Normal
Assignee: Eregon (Benoit Daloze)
Category: core
Target version:
ruby -v: ruby 2.0.0dev (2012-12-10 trunk 38297) [x86_64-linux]


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]]
Posted by no6v (Nobuhiro IMAI) (Guest)
on 2012-12-12 02:00
(Received via mailing list)
Issue #7540 has been updated by no6v (Nobuhiro IMAI).


Cool! We are lucky to find this, and then fixed. Thanks :).

----------------------------------------
Bug #7540: Proc#parameters cannot show :opt with :rest and :keyword
https://bugs.ruby-lang.org/issues/7540#change-34643

Author: no6v (Nobuhiro IMAI)
Status: Closed
Priority: Normal
Assignee: Eregon (Benoit Daloze)
Category: core
Target version:
ruby -v: ruby 2.0.0dev (2012-12-10 trunk 38297) [x86_64-linux]


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]]
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.