From 30e6eb7a7b152973450bb35f5b7866e673cadaeb Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 15 Mar 2004 02:27:29 +0000 Subject: * eval.c (rb_yield_0): should not re-submit TAG_BREAK if this yield is not break destination. [ruby-dev:23197] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 1807b8134..b1ea3cd44 100644 --- a/string.c +++ b/string.c @@ -1670,7 +1670,7 @@ rb_str_aset(str, indx, val) switch (TYPE(indx)) { case T_FIXNUM: num_index: - idx = NUM2LONG(indx); + idx = FIX2LONG(indx); if (RSTRING(str)->len <= idx) { out_of_range: rb_raise(rb_eIndexError, "index %ld out of string", idx); @@ -1685,7 +1685,7 @@ rb_str_aset(str, indx, val) RSTRING(str)->len += 1; RESIZE_CAPA(str, RSTRING(str)->len); } - RSTRING(str)->ptr[idx] = NUM2INT(val) & 0xff; + RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff; } else { rb_str_splice(str, idx, 1, val); -- cgit