summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 0d1898313b..873219a433 100644
--- a/hash.c
+++ b/hash.c
@@ -248,7 +248,7 @@ rb_hash_dup(VALUE hash)
static void
rb_hash_modify_check(VALUE hash)
{
- if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
+ rb_check_frozen(hash);
if (!OBJ_UNTRUSTED(hash) && rb_safe_level() >= 4)
rb_raise(rb_eSecurityError, "Insecure: can't modify hash");
}