summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--string.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f961f0404..00c14a1b31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Dec 11 09:36:29 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * string.c (rb_str_aset): index double decode problem.
+ [ruby-core:09695]
+
Sat Dec 9 21:39:24 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (ruby_cleanup): keep the exception till after END blocks.
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);