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 | ef816db96f1ec52a537a7623b476639291483fc2 (patch) | |
tree | 70ef6b76456edcf29f093137da1a70258b4902b6 /ext/iconv | |
parent | 0123f3a922c677c6117061aa06c9cd3bda55e9c1 (diff) | |
download | ruby-ef816db96f1ec52a537a7623b476639291483fc2.tar.gz |
* ext/iconv/iconv.c (rb_str_derive): uses rb_str_subseq() for byte
length. [ruby-dev:33653]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/iconv')
-rw-r--r-- | ext/iconv/iconv.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |