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

ruby-changes:2858

From: ko1@a...
Date: 20 Dec 2007 09:08:39 +0900
Subject: [ruby-changes:2858] matz - Ruby:r14349 (trunk): * string.c (rb_str_index): wrong starting position.

matz	2007-12-20 09:08:23 +0900 (Thu, 20 Dec 2007)

  New Revision: 14349

  Modified files:
    trunk/ChangeLog
    trunk/string.c

  Log:
    * string.c (rb_str_index): wrong starting position.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/string.c?r1=14349&r2=14348
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14349&r2=14348

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14348)
+++ ChangeLog	(revision 14349)
@@ -1,3 +1,7 @@
+Thu Dec 20 09:06:54 2007  Yukihiro Matsumoto  <matz@r...>
+
+	* string.c (rb_str_index): wrong starting position.
+
 Thu Dec 20 06:34:27 2007  Koichi Sasada  <ko1@a...>
 
 	* compile.c (iseq_compile_each): add pop after throw as return.
Index: string.c
===================================================================
--- string.c	(revision 14348)
+++ string.c	(revision 14349)
@@ -1457,6 +1457,7 @@
     s = RSTRING_PTR(str);
     if (offset) {
 	offset = str_offset(s, RSTRING_END(str), offset, enc, IS_7BIT(str));
+	s += offset;
     }
     if (slen == 0) return offset;
     /* need proceed one character at a time */

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

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