[svn:parrot] r46056 - trunk/t/compilers/pge/p5regex

mikehh at svn.parrot.org mikehh at svn.parrot.org
Tue Apr 27 13:01:44 UTC 2010


Author: mikehh
Date: Tue Apr 27 13:01:43 2010
New Revision: 46056
URL: https://trac.parrot.org/parrot/changeset/46056

Log:
change in-place substr to replace

Modified:
   trunk/t/compilers/pge/p5regex/p5rx.t

Modified: trunk/t/compilers/pge/p5regex/p5rx.t
==============================================================================
--- trunk/t/compilers/pge/p5regex/p5rx.t	Tue Apr 27 11:35:54 2010	(r46055)
+++ trunk/t/compilers/pge/p5regex/p5rx.t	Tue Apr 27 13:01:43 2010	(r46056)
@@ -825,27 +825,27 @@
   target1:
     $I0 = index target, '\n'
     if $I0 == -1 goto target2
-    substr target, $I0, 2, "\n"
+    target = replace target, $I0, 2, "\n"
     goto target1
   target2:
     $I0 = index target, '\r'
     if $I0 == -1 goto target3
-    substr target, $I0, 2, "\r"
+    target = replace target, $I0, 2, "\r"
     goto target2
   target3:
     $I0 = index target, '\e'
     if $I0 == -1 goto target4
-    substr target, $I0, 2, "\e"
+    target = replace target, $I0, 2, "\e"
     goto target3
   target4:
     $I0 = index target, '\t'
     if $I0 == -1 goto target5
-    substr target, $I0, 2, "\t"
+    target = replace target, $I0, 2, "\t"
     goto target4
   target5:
     $I0 = index target, '\f'
     if $I0 == -1 goto target6
-    substr target, $I0, 2, "\f"
+    target = replace target, $I0, 2, "\f"
     goto target5
   target6:
     # handle \xHH, hex escape.
@@ -859,7 +859,7 @@
     if $I2 > $I1 goto target7
     $S0 = substr target, $I2, 2
     $S1 = hex_chr($S0)
-    substr target, $I0, 4, $S1
+    target = replace target, $I0, 4, $S1
 
     inc x_pos
     goto target6


More information about the parrot-commits mailing list