Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test to ensure blocks at the same level as variable definitons don't
trounce variable values.
  • Loading branch information
snarkyboojum committed Apr 29, 2010
1 parent 135389c commit 133495c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t/runtime.t
Expand Up @@ -25,6 +25,7 @@ my @tests =
'my $a = 42; { say $a }', "42\n", 'variable in a block',
'my $a = 42; { say my $a }', "Any()\n", 'new variable in a block',
'my $a; { $a = 42 }; say $a', "42\n", 'value survives block',
'my $a = 42; {my $a = 7}; say $a', "42\n", 'initialised value survives block',
'{}; my $a = 42; { say $a }', "42\n", 'same-level blocks',
;

Expand Down

0 comments on commit 133495c

Please sign in to comment.