diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-02 08:41:13 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-02 08:41:13 +0000 |
commit | 7c26006a21f2f34bec739a074bf46ed429fcee79 (patch) | |
tree | 1e8fee6e140a3264fc3b758aea27b7557dfeb1c1 | |
parent | 1b5e93c6f3d83852b633e7b087a706d6760ad0c4 (diff) |
merge revision(s) 16851:
* ext/iconv/iconv.c (iconv_iconv): fixed backport miss.
[ruby-core:17115]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/iconv/iconv.c | 7 | ||||
-rw-r--r-- | version.h | 8 |
3 files changed, 15 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Wed Jul 2 17:38:01 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/iconv/iconv.c (iconv_iconv): fixed backport miss. + [ruby-core:17115] + Tue Jul 1 15:09:37 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * array.c (rb_ary_fill): check if beg is too big. diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 4736cb1008..4674aa330e 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -755,7 +755,12 @@ iconv_iconv if (!NIL_P(str)) slen = RSTRING_LEN(StringValue(str)); if (argc != 2 || !RTEST(rb_range_beg_len(n1, &start, &length, slen, 0))) { if (NIL_P(n1) || ((start = NUM2LONG(n1)) < 0 ? (start += slen) >= 0 : start < slen)) { - if (!NIL_P(n2)) length = NUM2LONG(n2); + if (NIL_P(n2)) { + length = -1; + } + else if ((length = NUM2LONG(n2)) >= slen - start) { + length = slen - start; + } } } @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2008-07-01" +#define RUBY_RELEASE_DATE "2008-07-02" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20080701 -#define RUBY_PATCHLEVEL 257 +#define RUBY_RELEASE_CODE 20080702 +#define RUBY_PATCHLEVEL 258 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 7 -#define RUBY_RELEASE_DAY 1 +#define RUBY_RELEASE_DAY 2 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; |