From 637d08241a59b56086ef36dfd78a7961b439d82b Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 23 May 2015 18:39:11 +0000 Subject: [PATCH] merge revision(s) 50509: [Backport #11132] * string.c: added documentation for character sequence \' with String#sub [Bug #11132][ruby-core:69121][fix GH-900][ci skip] Patch by @shishir127 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 3 +++ version.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3d6ae81a9f..dcfd762f46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun May 24 03:37:14 2015 SHIBATA Hiroshi + + * string.c: added documentation for character sequence \' with String#sub + [Bug #11132][ruby-core:69121][fix GH-900][ci skip] Patch by @shishir127 + Sun May 24 03:32:53 2015 SHIBATA Hiroshi * rational.c: Added documentation for rational literal. diff --git a/string.c b/string.c index 1753b37bdc..e6a5fb83fc 100644 --- a/string.c +++ b/string.c @@ -4226,6 +4226,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. diff --git a/version.h b/version.h index 7e2856363b..8b81494490 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.2.3" #define RUBY_RELEASE_DATE "2015-05-24" -#define RUBY_PATCHLEVEL 124 +#define RUBY_PATCHLEVEL 125 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 5