Skip to content

Doc patch for Bug #11132 #900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>&$</code>, 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. <code>"\\'"</code>, then it
* will have to be preceded by two backslashes like so <code>"\\\\'"</code>.
*
* If the second argument is a Hash, and the matched text is one of its keys,
* the corresponding value is the replacement string.
Expand Down