summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/iconv/iconv.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a867a5b36a..7b589d8dad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Fri Feb 8 19:19:55 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Feb 8 19:22:13 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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]
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 357a666abe..ed46234077 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -319,7 +319,7 @@ rb_str_derive(VALUE str, const char* ptr, int len)
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);