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
commitf70c171f8c8198b54d08d0c09b594a512d4997ae (patch)
tree96a331221c76edf2e44fee6b407540397d93bb12 /string.c
parenta7784d0048ba71bb619286b3256d88d35655c254 (diff)
* string.c (rb_str_aset): index double decode problem.
[ruby-core:09695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@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 8fc5c9836a..1e1fa33ebf 100644
--- a/string.c
+++ b/string.c
@@ -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);