From f433d710d0ab3b367cc4a851cdfb81c5405bb7f8 Mon Sep 17 00:00:00 2001 From: shugo Date: Wed, 13 Aug 2008 07:25:05 +0000 Subject: * object.c (rb_obj_untrusted): new method Object#untrusted?. (rb_obj_untrust): new method Object#untrust. (rb_obj_trust): new method Object#trust. * array.c, debug.c, time.c, include/ruby/ruby.h, re.c, variable.c, string.c, io.c, dir.c, vm_method.c, struct.c, class.c, hash.c, ruby.c, marshal.c: fixes for Object#untrusted?. * test/ruby/test_module.rb, test/ruby/test_array.rb, test/ruby/test_object.rb, test/ruby/test_string.rb, test/ruby/test_marshal.rb, test/ruby/test_hash.rb: added tests for Object#untrusted?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 027256869a..83b0f7b31b 100644 --- a/struct.c +++ b/struct.c @@ -144,7 +144,7 @@ static void rb_struct_modify(VALUE s) { if (OBJ_FROZEN(s)) rb_error_frozen("Struct"); - if (!OBJ_TAINTED(s) && rb_safe_level() >= 4) + if (!OBJ_UNTRUSTED(s) && rb_safe_level() >= 4) rb_raise(rb_eSecurityError, "Insecure: can't modify Struct"); } -- cgit v1.2.3