mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@50509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cff3676c94
commit
5ffb21ebbd
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat May 16 21:41:24 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* string.c: added documentation for character sequence \' with String#sub
|
||||
[Bug #11132][ruby-core:69121][fix GH-900][ci skip] Patch by @shishir127
|
||||
|
||||
Sat May 16 21:38:05 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* enum.c: fix a sample code. Patch by @eagletmt
|
||||
|
|
3
string.c
3
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 <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.
|
||||
|
|
Loading…
Add table
Reference in a new issue