From deca1d8007e88775f5dd92074026fd06dc385045 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Thu, 5 May 2016 05:39:35 +0000 Subject: [PATCH] * string.c (rb_str_sub): Fix a special match variable name. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9fdca7920d..2fcd36bbdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu May 5 14:41:05 2016 Yuichiro Kaneko + + * string.c (rb_str_sub): Fix a special match variable name. + [ci skip] + Thu May 5 12:22:17 2016 Nobuyoshi Nakada * vm_eval.c (rb_eval_cmd, rb_catch_obj): use TH_JUMP_TAG with the diff --git a/string.c b/string.c index 9ccf0933e2..a7502b4166 100644 --- a/string.c +++ b/string.c @@ -4647,7 +4647,7 @@ rb_str_sub_bang(int argc, VALUE *argv, VALUE str) * "\\k", where n is a group name. If it is a * 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. + * 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 actually not a pattern capture group e.g. "\\'", then it * will have to be preceded by two backslashes like so "\\\\'".