[前][次][番号順一覧][スレッド一覧]

ruby-changes:36384

From: nobu <ko1@a...>
Date: Mon, 17 Nov 2014 04:11:50 +0900 (JST)
Subject: [ruby-changes:36384] nobu:r48465 (trunk): string.c: escape a backslash [ci skip]

nobu	2014-11-17 04:11:37 +0900 (Mon, 17 Nov 2014)

  New Revision: 48465

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48465

  Log:
    string.c: escape a backslash [ci skip]
    
    * string.c (rb_str_count): [DOC] add a backslash to escape a
      backslash itself.  [ruby-core:66321]

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 48464)
+++ string.c	(revision 48465)
@@ -6145,7 +6145,7 @@ rb_str_tr_s(VALUE str, VALUE src, VALUE https://github.com/ruby/ruby/blob/trunk/string.c#L6145
  *  intersection of these sets defines the characters to count in +str+.  Any
  *  +other_str+ that starts with a caret <code>^</code> is negated.  The
  *  sequence <code>c1-c2</code> means all characters between c1 and c2.  The
- *  backslash character <code>\</code> can be used to escape <code>^</code> or
+ *  backslash character <code>\\</code> can be used to escape <code>^</code> or
  *  <code>-</code> and is otherwise ignored unless it appears at the end of a
  *  sequence or the end of a +other_str+.
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]