aboutsummaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/struct.c b/struct.c
index 136ba0acee..ab82fadd1c 100644
--- a/struct.c
+++ b/struct.c
@@ -153,8 +153,7 @@ static void
rb_struct_modify(VALUE s)
{
rb_check_frozen(s);
- if (!OBJ_UNTRUSTED(s) && rb_safe_level() >= 4)
- rb_raise(rb_eSecurityError, "Insecure: can't modify Struct");
+ rb_check_trusted(s);
}
static VALUE