diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-08 10:22:15 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-08 10:22:15 +0000 |
| commit | 3f8155ba7e3edf8bf49597e2ce1b6d7526a701f6 (patch) | |
| tree | 70ef6b76456edcf29f093137da1a70258b4902b6 | |
| parent | b14849b101a1f43e4c93bc69c4d6b31c779c5dc2 (diff) | |
| download | ruby-3f8155ba7e3edf8bf49597e2ce1b6d7526a701f6.tar.gz ruby-3f8155ba7e3edf8bf49597e2ce1b6d7526a701f6.tar.xz ruby-3f8155ba7e3edf8bf49597e2ce1b6d7526a701f6.zip | |
* ext/iconv/iconv.c (rb_str_derive): uses rb_str_subseq() for byte
length. [ruby-dev:33653]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/iconv/iconv.c | 2 |
2 files changed, 5 insertions, 2 deletions
@@ -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 357a666ab..ed4623407 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); |
