aboutsummaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index f0a377c211..78f836f8f5 100644
--- a/struct.c
+++ b/struct.c
@@ -151,7 +151,7 @@ static VALUE (*const ref_func[])(VALUE) = {
static void
rb_struct_modify(VALUE s)
{
- if (OBJ_FROZEN(s)) rb_error_frozen("Struct");
+ rb_check_frozen(s);
if (!OBJ_UNTRUSTED(s) && rb_safe_level() >= 4)
rb_raise(rb_eSecurityError, "Insecure: can't modify Struct");
}