summaryrefslogtreecommitdiff
path: root/t/op/my.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/my.t')
-rwxr-xr-xt/op/my.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/my.t b/t/op/my.t
index 06c6963534..d439bebd86 100755
--- a/t/op/my.t
+++ b/t/op/my.t
@@ -2,7 +2,7 @@
# $RCSfile: my.t,v $
-print "1..28\n";
+print "1..30\n";
sub foo {
my($a, $b) = @_;
@@ -83,3 +83,11 @@ foreach my $i (26, 27) {
print "not " if $i ne "outer";
print "ok 28\n";
+
+# Ensure that C<my @y> (without parens) doesn't force scalar context.
+my @x;
+{ @x = my @y }
+print +(@x ? "not " : ""), "ok 29\n";
+{ @x = my %y }
+print +(@x ? "not " : ""), "ok 30\n";
+