--- mmap.c.orig Thu Feb 1 14:52:50 2007 +++ mmap.c Thu Feb 1 14:55:16 2007 @@ -1113,7 +1113,7 @@ } else { RSTRING(str)->ptr += start; - repl = rb_reg_regsub(repl, str, regs); + repl = rb_reg_regsub(repl, str, regs, pat); RSTRING(str)->ptr -= start; } if (OBJ_TAINTED(repl)) tainted = 1; @@ -1211,7 +1211,7 @@ } else { RSTRING(str)->ptr += start; - val = rb_reg_regsub(repl, str, regs); + val = rb_reg_regsub(repl, str, regs, pat); RSTRING(str)->ptr -= start; } if (OBJ_TAINTED(repl)) tainted = 1;