From ba510004112153622a7319559c8ca952193b3b8b Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 17 Jan 2012 20:33:28 -0800 Subject: =?UTF-8?q?Don=E2=80=99t=20crash=20on=20@a=20=3D~=20//=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar to bug #106726, caused by 579333ee9e3 and fixed by c6fb3f6. This bug was caused by c6771ab63d, which had exactly the same mistake. Attempting to use find_runcv at compile time to find a variable name is not going to work in general. It only works by accident some of the time. --- t/re/pat.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/re/pat.t b/t/re/pat.t index 54d44ac046..7b03e41fce 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -21,7 +21,7 @@ BEGIN { require './test.pl'; } -plan tests => 464; # Update this when adding/deleting tests. +plan tests => 465; # Update this when adding/deleting tests. run_tests() unless caller; @@ -1215,6 +1215,13 @@ EOP like("\xffb", qr/$pat/i, "/i: utf8 pattern, non-utf8 string, latin1-char preceding matching char in string"); } + { # Crash with @a =~ // warning + local $SIG{__WARN__} = sub { + pass 'no crash for @a =~ // warning' + }; + eval ' sub { my @a =~ // } '; + } + } # End of sub run_tests 1; -- cgit v1.2.1