diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-11 00:45:32 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-11 00:45:32 +0000 |
| commit | 787db042ef9330de71dccf99b0d13411a56de723 (patch) | |
| tree | 96a331221c76edf2e44fee6b407540397d93bb12 /string.c | |
| parent | 3629264d825c52c44eb89bf1cb0aad246bb09941 (diff) | |
| download | ruby-787db042ef9330de71dccf99b0d13411a56de723.tar.gz ruby-787db042ef9330de71dccf99b0d13411a56de723.tar.xz ruby-787db042ef9330de71dccf99b0d13411a56de723.zip | |
* string.c (rb_str_aset): index double decode problem.
[ruby-core:09695]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1811,8 +1811,8 @@ rb_str_aset(VALUE str, VALUE indx, VALUE val) switch (TYPE(indx)) { case T_FIXNUM: - num_index: idx = FIX2LONG(indx); + num_index: if (RSTRING_LEN(str) <= idx) { out_of_range: rb_raise(rb_eIndexError, "index %ld out of string", idx); |
