-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mruby-proc-ext: #parameters mistakes keyword "splat" for a block parameter #5066
Comments
ntl
changed the title
mruby-proc-ext: #parameters mistakes keyword "splat" and block parameters
mruby-proc-ext: #parameters mistakes keyword "splat" for a block parameter
Aug 14, 2020
matz
added a commit
that referenced
this issue
Aug 17, 2020
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
It's fixed in the mruby3 branch. |
Thanks so much! |
matz
added a commit
that referenced
this issue
Aug 31, 2020
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
matz
added a commit
that referenced
this issue
Sep 17, 2020
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
matz
added a commit
that referenced
this issue
Sep 18, 2020
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
matz
added a commit
that referenced
this issue
Sep 29, 2020
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
matz
added a commit
that referenced
this issue
Oct 14, 2020
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, thanks so much for MRuby!
I'm currently investigating some behavior in
Proc#parameters
(frommrbgems/mruby-proc-ext
), and believe I may have spotted a bug (or else I am unaware of the expected behavior). Here is a file that reproduces my issue (I put it in a test project under e.g.mrblib/bug_example.rb
):When I run the above code, with
mruby-proc-ext
(andmruby-io
, for#puts
), I see the following output:This indicates that the
**keyrestp
parameter has been interpreted as a block parameter. I'm not sure how keyword arguments are handled internally by MRuby, but I believe the expected output is this:I'm not sure how
mruby-proc-ext
is supposed to work with keyword arguments. I have discovered that the keyword arguments appear to be placed in the stack after the block argument (andmrb->c->ci->argc
does not indicate their presence; onlyci_nregs
insrc/vm.c
, line 405).I am very new to MRuby, though, so I realize I may be in error here.
The text was updated successfully, but these errors were encountered: