This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Bug in regexp-substitute/global
- To: guile AT sourceware.cygnus dot com
- Subject: Bug in regexp-substitute/global
- From: Greg Badros <gjb AT cs.washington dot edu>
- Date: 15 Sep 1999 22:34:20 -0700
- Cc: scwm-discuss AT scwm.mit dot edu
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)))))