This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in regexp-substitute/global


This behaviour has changed (in current CVS) since guile-1.3:


Old (correct, IMO) behaviour:

(regexp-substitute/global #f "x" "string" 'pre "y" 'post)
=>  "string"   ;; no substitutions applied


New (in CVS), buggy behaviour:
=>  ""        ;; empty string?  what gives!?!?

If a (any!) substitution is made, then the result is correct.

I think this patch is correct and should be applied ASAP (I've not yet
received word about my write access to the repository).

--- regex.scm   1999/09/11 17:38:31     1.4
+++ regex.scm   1999/09/16 05:33:06
@@ -196,4 +196,5 @@
                        (do-item (car items)) ; This is a tail call.
                        (begin
                          (do-item (car items)) ; This is not.
-                         (next-item (cdr items)))))))))))
+                         (next-item (cdr items)))))))
+           (display string port)))))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]