From fdc9afd6885a5f50d957e826c8694b72de70673d Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 30 Oct 2004 15:33:03 +0000 Subject: * string.c (rb_str_locktmp): lock string temporarily. * string.c (str_independent): add tmplock check. * io.c (io_write): lock output string temporarily. [ruby-dev:24649] * io.c (io_write): use rb_str_locktmp(). * io.c (read_all): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'array.c') diff --git a/array.c b/array.c index 26f56be66..860cd644e 100644 --- a/array.c +++ b/array.c @@ -50,7 +50,7 @@ rb_ary_modify_check(ary) { if (OBJ_FROZEN(ary)) rb_error_frozen("array"); if (FL_TEST(ary, ARY_TMPLOCK)) - rb_raise(rb_eTypeError, "can't modify array during iteration"); + rb_raise(rb_eRuntimeError, "can't modify array during iteration"); if (!OBJ_TAINTED(ary) && rb_safe_level() >= 4) rb_raise(rb_eSecurityError, "Insecure: can't modify array"); } -- cgit