以下の五通りの処理で、
文字列の汚染状態が伝染していません。
(cryptはひょっとすると、必要ないかもしれませんが。)

# []=
s1 = "abc"
s2 = "cde".taint
s1[0]= s2
p s1.tainted?             # => false

# crypt
s = "abc".taint
p s.crypt("cd").tainted?  # => false

# ljust
s = "abc".taint
p s.ljust(10).tainted?    # => false

# rjust
s = "abc".taint
p s.rjust(10).tainted?    # => false

# center
s = "abc".taint
p s.center(10).tainted?   # => false


	* string.c (rb_str_replace): add taint status infection (OBJ_INFECT()).
	* string.c (rb_str_crypt): ditto.
	* string.c (rb_str_ljust): ditto.
	* string.c (rb_str_rjust): ditto.
	* string.c (rb_str_center): ditto.

--- string.c.orig	Mon Mar 26 17:56:04 2001
+++ string.c	Fri May 25 14:19:25 2001
@@ -968,6 +968,7 @@
     }
     RSTRING(str)->len += RSTRING(val)->len - len;
     RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
+    OBJ_INFECT(str, val);
 }
 
 static VALUE rb_str_sub_bang _((int, VALUE*, VALUE));
@@ -2634,11 +2635,15 @@
     VALUE str, salt;
 {
     extern char *crypt();
+    VALUE result;
 
     if (TYPE(salt) != T_STRING) salt = rb_str_to_str(salt);
     if (RSTRING(salt)->len < 2)
 	rb_raise(rb_eArgError, "salt too short(need >=2 bytes)");
-    return rb_str_new2(crypt(RSTRING(str)->ptr, RSTRING(salt)->ptr));
+
+    result = rb_str_new2(crypt(RSTRING(str)->ptr, RSTRING(salt)->ptr));
+    OBJ_INFECT(result, str);
+    return result;
 }
 
 static VALUE
@@ -2715,6 +2720,7 @@
     while (p < pend) {
 	*p++ = ' ';
     }
+    OBJ_INFECT(res, str);
     return res;
 }
 
@@ -2734,6 +2740,7 @@
 	*p++ = ' ';
     }
     memcpy(pend, RSTRING(str)->ptr, RSTRING(str)->len);
+    OBJ_INFECT(res, str);
     return res;
 }
 
@@ -2759,6 +2766,7 @@
     while (p < pend) {
 	*p++ = ' ';
     }
+    OBJ_INFECT(res, str);
     return res;
 }
 
----
小迫@ソフネック   渋谷区恵比寿1-15-1