Skip to content

Commit

Permalink
Add :$all to methods() for Perl 6 compatability
Browse files Browse the repository at this point in the history
For some types, calling .^methods(:all) in Rakudo would end up in NQP.
None of the NQP methods() had a :$all parameter, so they would die with
`Unexpected named argument 'all' passed`. Per
https://irclog.perlgeek.de/perl6-dev/2017-06-03#i_14681666 :$all doesn't
have any effect, so this commit adds them only for compatability.

BenGoldberg++ for the find, timotimo++ and jnthn++ for the debugging
help.
  • Loading branch information
MasterDuke17 committed Jun 3, 2017
1 parent 4ab0db9 commit c4af44b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/how/NQPClassHOW.nqp
Expand Up @@ -557,7 +557,7 @@ knowhow NQPClassHOW {
@!done;
}

method methods($obj, :$local = 0) {
method methods($obj, :$local = 0, :$all) {
if $local {
@!method_order
}
Expand Down
2 changes: 1 addition & 1 deletion src/how/NQPConcreteRoleHOW.nqp
Expand Up @@ -123,7 +123,7 @@ knowhow NQPConcreteRoleHOW {
## Introspecty
##

method methods($obj, :$local) {
method methods($obj, :$local, :$all) {
my @meths;
for %!methods {
nqp::push(@meths, nqp::iterval($_));
Expand Down
2 changes: 1 addition & 1 deletion src/how/NQPParametricRoleHOW.nqp
Expand Up @@ -168,7 +168,7 @@ knowhow NQPParametricRoleHOW {
## Introspecty
##

method methods($obj, :$local) {
method methods($obj, :$local, :$all) {
my @meths;
for %!methods {
nqp::push(@meths, nqp::iterval($_));
Expand Down

0 comments on commit c4af44b

Please sign in to comment.