summaryrefslogtreecommitdiffhomepage
path: root/src/hash.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-12-12 18:41:18 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-12-12 18:41:18 +0900
commitbbb088234395efda23540d30ab5d1cb40f220d82 (patch)
tree4f66588878264c0d2a17529629d7d183d6a49d29 /src/hash.c
parentd4ff92bcf65ce140495014f40d22b93a1b1fb957 (diff)
downloadmruby-bbb088234395efda23540d30ab5d1cb40f220d82.tar.gz
mruby-bbb088234395efda23540d30ab5d1cb40f220d82.zip
Modifying frozen objects will raise `FrozenError`.
`FrozenError` is a subclass of `RuntimeError` which used to be raised. [Ruby2.5]
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index feb06d843..d58706954 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -286,7 +286,7 @@ static void
mrb_hash_modify(mrb_state *mrb, mrb_value hash)
{
if (MRB_FROZEN_P(mrb_hash_ptr(hash))) {
- mrb_raise(mrb, E_RUNTIME_ERROR, "can't modify frozen hash");
+ mrb_raise(mrb, E_FROZEN_ERROR, "can't modify frozen hash");
}
mrb_hash_tbl(mrb, hash);
}