summaryrefslogtreecommitdiffhomepage
path: root/src/variable.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/variable.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/variable.c')
-rw-r--r--src/variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/variable.c b/src/variable.c
index f0bfa19cc..968fc2fc1 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -261,7 +261,7 @@ mrb_obj_iv_set(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
iv_tbl *t = obj->iv;
if (MRB_FROZEN_P(obj)) {
- mrb_raisef(mrb, E_RUNTIME_ERROR, "can't modify frozen %S", mrb_obj_value(obj));
+ mrb_raisef(mrb, E_FROZEN_ERROR, "can't modify frozen %S", mrb_obj_value(obj));
}
if (!t) {
t = obj->iv = iv_new(mrb);