From: "U.Nakamura" Date: 2010-11-25T13:31:44+09:00 Subject: [ruby-core:33351] Re: [Ruby 1.9-Bug#4087][Open] String#scan(arg) taints results if arg is a Regexp but not if arg is a String Hello, In message "[ruby-core:33338] [Ruby 1.9-Bug#4087][Open] String#scan(arg) taints results if arg is a Regexp but not if arg is a String" on Nov.25,2010 05:38:28, wrote: > Bug #4087: String#scan(arg) taints results if arg is a Regexp but not if arg is a String > Is this intended? Maybe not. patch for trunk. Index: re.c =================================================================== --- re.c (revision 29923) +++ re.c (working copy) @@ -2443,6 +2443,7 @@ } ret = rb_reg_initialize(obj, RSTRING_PTR(str), RSTRING_LEN(str), enc, options, err, sourcefile, sourceline); + OBJ_INFECT(obj, str); RB_GC_GUARD(str); return ret; } Regards, -- U.Nakamura