Change 11403 by nick@camel-linux on 2001/07/18 06:38:57
Subject: Re: [ID 20010716.005] numeric conversions in 5.7.[12] changed from
perl5.6.1 (leading whitespace)
From: [EMAIL PROTECTED]
Date: Wed, 18 Jul 2001 05:21:54 +0100
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/numeric.c#6 edit
... //depot/perl/t/op/arith.t#10 edit
Differences ...
==== //depot/perl/numeric.c#6 (text) ====
Index: perl/numeric.c
--- perl/numeric.c.~1~ Wed Jul 18 00:45:06 2001
+++ perl/numeric.c Wed Jul 18 00:45:06 2001
@@ -629,6 +629,10 @@
I32 ipart = 0; /* index into part[] */
I32 offcount; /* number of digits in least significant part */
+ /* leading whitespace */
+ while (isSPACE(*s))
+ ++s;
+
/* sign */
switch (*s) {
case '-':
==== //depot/perl/t/op/arith.t#10 (xtext) ====
Index: perl/t/op/arith.t
--- perl/t/op/arith.t.~1~ Wed Jul 18 00:45:06 2001
+++ perl/t/op/arith.t Wed Jul 18 00:45:06 2001
@@ -1,6 +1,6 @@
#!./perl -w
-print "1..109\n";
+print "1..113\n";
sub try ($$) {
print +($_[1] ? "ok" : "not ok"), " $_[0]\n";
@@ -204,3 +204,10 @@
tryeq 107, 46339 * -46341, -0x7ffea80f;
tryeq 108, -46339 * 46341, -0x7ffea80f;
tryeq 109, -46339 * -46341, 0x7ffea80f;
+
+# leading space should be ignored
+
+tryeq 110, 1 + " 1", 2;
+tryeq 111, 3 + " -1", 2;
+tryeq 112, 1.2, " 1.2";
+tryeq 113, -1.2, " -1.2";
End of Patch.