summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-12-11 00:45:32 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-12-11 00:45:32 +0000
commit27f520056e20210d4f8e73a40f948d48a7d69d18 (patch)
treeb1517dba6fecdba9775038fd4678073b60043895 /string.c
parentbb949fd2676aab14aa86712341b2ec2078de8f8d (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 9ab850af76..fb8afdbeda 100644
--- a/string.c
+++ b/string.c
@@ -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);