summaryrefslogtreecommitdiff
path: root/t/op/my.t
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 15:46:35 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 15:46:35 +0000
commitcdaebead333273a920fe10cbcb2213a9fbefa241 (patch)
tree16a4f7c9dca71b61211eac8a55ea494c5552a29b /t/op/my.t
parent49d8d3a1123fb996c090905424ed66f675b3df17 (diff)
downloadperl-cdaebead333273a920fe10cbcb2213a9fbefa241.tar.gz
More Chip patches (tweaked for _5x). The final one mentioned here
(@ARGV with -i) actually went in at change 462 but I failed to add it to the change description: Subject: [PATCH] Fix typo: "FORM{,AT}LINE" Date: Sun, 11 Jan 1998 19:37:17 -0500 (EST) Subject: [PATCH] Fix for C<@x = my @y> Date: Sun, 11 Jan 1998 18:12:16 -0500 (EST) Subject: [PATCH] Fix SEGV on C<*glob{SCALAR,ARRAY}> Date: Thu, 5 Feb 1998 21:30:13 -0500 (EST) Subject: [PATCH] Allow last() to mean last Date: Thu, 5 Feb 1998 21:42:57 -0500 (EST) Subject: [PATCH] Consider @ARGV to be plain files if inplace (-i) Date: Wed, 4 Feb 1998 16:04:47 -0500 (EST) p4raw-id: //depot/perl@465
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";
+