Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Put the sub definition inside the eval to make it callable

git-svn-id: http://svn.pugscode.org/pugs@29980 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit a297d279802f70a7c4c596e210c4723174e1e1c4 1 parent 7201d4d
baest authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 S06-signature/optional.t
View
12 S06-signature/optional.t
@@ -45,7 +45,11 @@ dies_ok {foo_53814(1,Mu,'something_extra',:y(3))},
'die on too many parameters (was once bug RT 53814)';
{
- sub rt54804( $v, $w?, $x?, $y? ) {
+
+ # old test is bogus, nullterm only allowed at the end of a list
+ # is rt54804( 1, , 3, ), '1|undef|3|undef',
+ # 'two commas parse as if undef is between them';
+ eval_dies_ok q/sub rt54804( $v, $w?, $x?, $y? ) {
(defined( $v ) ?? $v !! 'undef')
~ '|' ~
(defined( $w ) ?? $w !! 'undef')
@@ -54,11 +58,7 @@ dies_ok {foo_53814(1,Mu,'something_extra',:y(3))},
~ '|' ~
(defined( $y ) ?? $y !! 'undef')
}
-
- # old test is bogus, nullterm only allowed at the end of a list
- # is rt54804( 1, , 3, ), '1|undef|3|undef',
- # 'two commas parse as if undef is between them';
- eval_dies_ok 'rt54804( 1, , 3, )', "two commas in a row doesn't parse";
+ rt54804( 1, , 3, )/, "two commas in a row doesn't parse";
}
#?rakudo todo 'RT 66822'
Please sign in to comment.
Something went wrong with that request. Please try again.