From 423d5bb55ab96d2dcac6d5f910fd0c96b524b8e2 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 11 Dec 2006 00:45:32 +0000 Subject: * string.c (rb_str_aset): index double decode problem. [ruby-core:09695] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 9ab850af7..fb8afdbed 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); -- cgit