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

ruby-changes:3915

From: ko1@a...
Date: Fri, 8 Feb 2008 19:22:30 +0900 (JST)
Subject: [ruby-changes:3915] nobu - Ruby:r15405 (trunk): * ext/iconv/iconv.c (rb_str_derive): uses rb_str_subseq() for byte

nobu	2008-02-08 19:22:15 +0900 (Fri, 08 Feb 2008)

  New Revision: 15405

  Modified files:
    trunk/ChangeLog
    trunk/ext/iconv/iconv.c

  Log:
    * ext/iconv/iconv.c (rb_str_derive): uses rb_str_subseq() for byte
      length.  [ruby-dev:33653]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/iconv/iconv.c?r1=15405&r2=15404&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15405&r2=15404&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15404)
+++ ChangeLog	(revision 15405)
@@ -1,5 +1,8 @@
-Fri Feb  8 19:19:55 2008  Nobuyoshi Nakada  <nobu@r...>
+Fri Feb  8 19:22:13 2008  Nobuyoshi Nakada  <nobu@r...>
 
+	* ext/iconv/iconv.c (rb_str_derive): uses rb_str_subseq() for byte
+	  length.  [ruby-dev:33653]
+
 	* ext/iconv/iconv.c (iconv_convert): added toidx argument to set
 	  encoding of successfully converted string.  [ruby-dev:33221]
 
Index: ext/iconv/iconv.c
===================================================================
--- ext/iconv/iconv.c	(revision 15404)
+++ ext/iconv/iconv.c	(revision 15405)
@@ -319,7 +319,7 @@
     if (NIL_P(str))
 	return rb_str_new(ptr, len);
     if (RSTRING_PTR(str) + RSTRING_LEN(str) == ptr + len)
-	ret = rb_str_substr(str, ptr - RSTRING_PTR(str), len);
+	ret = rb_str_subseq(str, ptr - RSTRING_PTR(str), len);
     else
 	ret = rb_str_new(ptr, len);
     OBJ_INFECT(ret, str);

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

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