summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-02-14 13:54:17 -0600
committerNicholas Clark <nick@ccl4.org>2005-04-07 09:53:08 +0000
commit88697ed32f5db53f5056302cc9a481a9955c7a4f (patch)
tree4c2b9781cc8481af42af4d217a3ce1685a02bf91 /perly.y
parent0d81f35eb4344b01c2723727fceae422baaebde8 (diff)
downloadperl-88697ed32f5db53f5056302cc9a481a9955c7a4f.tar.gz
Integrate:
[ 23960] [perl #34101] not() || 1 produces segmentation fault Fixed by making not() behave like not(0). This is also the way not() behaved before it started segfaulting in 5.6.0. [ 23967] Subject: [PATCH] Additional tests for t/op/not.t Message-ID: <20050215015417.GA30368@mccoy.peters.homeunix.org> p4raw-link: @23967 on //depot/perl: 1b293ed1e0e66b606ed121bd34c8112e6fd8e30d p4raw-link: @23960 on //depot/perl: a758b0b5fd9985d853637e2aa988519329533771 p4raw-id: //depot/maint-5.8/perl@24193 p4raw-branched: from //depot/perl@24186 'branch in' t/op/not.t (@23960..) p4raw-integrated: from //depot/perl@24186 'merge in' perly.y (@23900..) p4raw-integrated: from //depot/perl@23960 'edit in' MANIFEST (@23954..)
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/perly.y b/perly.y
index ccff774ef9..7cd3f32b08 100644
--- a/perly.y
+++ b/perly.y
@@ -712,7 +712,8 @@ term : termbinop
{ $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
scalar($1)); }
| FUNC1 '(' ')' /* not () */
- { $$ = newOP($1, OPf_SPECIAL); }
+ { $$ = $1 == OP_NOT ? newUNOP($1, 0, newSVOP(OP_CONST, 0, newSViv(0)))
+ : newOP($1, OPf_SPECIAL); }
| FUNC1 '(' expr ')' /* not($foo) */
{ $$ = newUNOP($1, 0, $3); }
| PMFUNC '(' term ')' /* split (/foo/) */