From bcc07ef4d1b4e447c8341688f5e06f11b43c000a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 22 Oct 2015 15:22:22 +0000 Subject: [PATCH] fix backslash [ci skip] * string.c (rb_str_tr): [DOC] Escape backslash in String#tr documentation. [Fix GH-1063] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index da17b01e1f..33fe6dc92c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 23 00:22:20 2015 Josef Simanek + + * string.c (rb_str_tr): [DOC] Escape backslash in String#tr + documentation. [Fix GH-1063] + Fri Oct 23 00:19:04 2015 yui-knk * array.c (rb_ary_collect): [DOC] Fix space of code example of diff --git a/string.c b/string.c index 99f0c1e9f8..af744c7607 100644 --- a/string.c +++ b/string.c @@ -6106,7 +6106,7 @@ rb_str_tr_bang(VALUE str, VALUE src, VALUE repl) * "hello".tr('a-y', 'b-z') #=> "ifmmp" * "hello".tr('^aeiou', '*') #=> "*e**o" * - * The backslash character \ can be used to escape + * The backslash character \\ can be used to escape * ^ or - and is otherwise ignored unless it * appears at the end of a range or the end of the +from_str+ or +to_str+: *