From 8e875c12285ebc611f5983dd434342a6bc4bca4a Mon Sep 17 00:00:00 2001 From: shishir127 Date: Sat, 16 May 2015 13:46:26 +0530 Subject: [PATCH] Doc patch for Bug #11132 --- string.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/string.c b/string.c index 943c18c1403d67..ca085405c0c669 100644 --- a/string.c +++ b/string.c @@ -4310,6 +4310,9 @@ rb_str_sub_bang(int argc, VALUE *argv, VALUE str) * double-quoted string, both back-references must be preceded by an * additional backslash. However, within +replacement+ the special match * variables, such as &$, will not refer to the current match. + * If +replacement+ is a String that looks like a pattern's capture group but + * is actaully not a pattern capture group e.g. "\\'", then it + * will have to be preceded by two backslashes like so "\\\\'". * * If the second argument is a Hash, and the matched text is one of its keys, * the corresponding value is the replacement string.