Skip to content

Commit

Permalink
Replace .gist with .name on a method object
Browse files Browse the repository at this point in the history
As suggested by lizmat and actually conforms better to the test purpose.
  • Loading branch information
vrurg authored and Altai-man committed Oct 24, 2020
1 parent c392baa commit 4a67c6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S12-methods/multi.t
Expand Up @@ -39,7 +39,7 @@ is($foo.bar(5), 'Foo.bar() called with Int : 5', '... multi-method dispatched on
is($foo.bar(4.2), 'Foo.bar() called with Numeric : 4.2', '... multi-method dispatched on Numeric');

throws-like { $foo.baz() }, X::Multi::NoMatch,
"Call with wrong nnumber of args results in no matching candidate exception";
"Call with wrong number of args results in no matching candidate exception";

class Foo2 {
multi method a($d) { #OK not used
Expand Down Expand Up @@ -116,7 +116,7 @@ is Bar.new.a("not an Int"), 'Any-method in Foo';
is $m.d( '7' ), 'string', 'dispatch to other role';
is $m.d( 1.2 ), 'any', 'dispatch to the class with the roles';

my @multi_method = $m.^methods.grep({ .gist eq 'd' });
my @multi_method = $m.^methods.grep({ .name eq 'd' });
is @multi_method.elems, 1, '.^methods returns one element for a multi';

my $routine = @multi_method[0];
Expand Down

0 comments on commit 4a67c6a

Please sign in to comment.