This is an automatically generated mail to inform you that tests are now available in t/spec/S06-signature/sub-ref.t
commit 5083fd82fecfbb1a527f1891758cc3c507c1816b Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Tue Jul 28 03:14:02 2009 +0000 [t/spec] Test for RT #63974 git-svn-id: http://svn.pugscode.org/p...@27768 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S06-signature/sub-ref.t b/t/spec/S06-signature/sub-ref.t index 570048d..60b81c0 100644 --- a/t/spec/S06-signature/sub-ref.t +++ b/t/spec/S06-signature/sub-ref.t @@ -4,7 +4,7 @@ use Test; # L<S02/"Built-In Data Types"> -plan 33; +plan 35; =begin description @@ -50,6 +50,19 @@ See L<S02/"Built-in Data Types"> for more information about Code, Routine, Sub, dies_ok { $foo.() }, "invocation of an parameterized block expecting a param without a param dies"; } +# RT #63974 +{ + my $topic = 'topic unchanged'; + my @topic_array = <topic array unchanged>; + my $c = { $topic = $_; @topic_array = @_ }; + + $c( 2, 3, 4, 5 ); + + is $topic, 2, '$_ got right value for code ref'; + #?rakudo todo 'RT #63974' + is @topic_array, ( 2, 3, 4, 5 ), '@_ got right value in code ref'; +} + { my $foo = sub { 100 + (@_[0] // -1) }; isa_ok($foo, Code);