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 | 27f520056e20210d4f8e73a40f948d48a7d69d18 (patch) | |
tree | b1517dba6fecdba9775038fd4678073b60043895 /string.c | |
parent | bb949fd2676aab14aa86712341b2ec2078de8f8d (diff) |
* string.c (rb_str_aset): index double decode problem.
[ruby-core:09695]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1725,8 +1725,8 @@ rb_str_aset(str, indx, val) switch (TYPE(indx)) { case T_FIXNUM: - num_index: idx = FIX2LONG(indx); + num_index: if (RSTRING(str)->len <= idx) { out_of_range: rb_raise(rb_eIndexError, "index %ld out of string", idx); |