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

ruby-changes:1777

From: ko1@a...
Date: 25 Aug 2007 16:14:11 +0900
Subject: [ruby-changes:1777] nobu - Ruby:r13268 (trunk): * string.c (rb_str_splice): return from void funtion.

nobu	2007-08-25 16:14:01 +0900 (Sat, 25 Aug 2007)

  New Revision: 13268

  Modified files:
    trunk/ChangeLog
    trunk/string.c

  Log:
    * string.c (rb_str_splice): return from void funtion.


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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13267)
+++ ChangeLog	(revision 13268)
@@ -1,9 +1,11 @@
-Sat Aug 25 16:06:40 2007  Nobuyoshi Nakada  <nobu@r...>
+Sat Aug 25 16:13:59 2007  Nobuyoshi Nakada  <nobu@r...>
 
 	* io.c (swallow): removed condition using an unset variable.
 
 	* parse.y, re.c: re-applied revision 13092.
 
+	* string.c (rb_str_splice): return from void funtion.
+
 Sat Aug 25 11:45:37 2007  Yukihiro Matsumoto  <matz@r...>
 
 	* encoding.c: provide basic features for M17N.
Index: string.c
===================================================================
--- string.c	(revision 13267)
+++ string.c	(revision 13268)
@@ -1889,7 +1889,7 @@
     /* error check */
     beg = p - RSTRING_PTR(str);	/* physical position */
     len = e - p;		/* physical length */
-    return rb_str_splice_0(str, beg, len, val);
+    rb_str_splice_0(str, beg, len, val);
 }
 
 void
@@ -2262,7 +2262,7 @@
     slen = RSTRING_LEN(str);
 
     rb_str_locktmp(dest);
-    while (beg >= 0) {
+    do {
 	n++;
 	match = rb_backref_get();
 	regs = RMATCH(match)->regs;
@@ -2309,7 +2309,7 @@
 	cp = RSTRING_PTR(str) + offset;
 	if (offset > RSTRING_LEN(str)) break;
 	beg = rb_reg_search(pat, str, offset, 0);
-    }
+    } while (beg >= 0);
     if (RSTRING_LEN(str) > offset) {
 	len = bp - buf;
 	if (blen - len < RSTRING_LEN(str) - offset) {

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

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