diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-12 18:41:18 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-12 18:41:18 +0900 |
| commit | bbb088234395efda23540d30ab5d1cb40f220d82 (patch) | |
| tree | 4f66588878264c0d2a17529629d7d183d6a49d29 /mrbgems/mruby-struct | |
| parent | d4ff92bcf65ce140495014f40d22b93a1b1fb957 (diff) | |
| download | mruby-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 'mrbgems/mruby-struct')
| -rw-r--r-- | mrbgems/mruby-struct/src/struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 8de4b6c52..adeb09bc1 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -89,7 +89,7 @@ static void mrb_struct_modify(mrb_state *mrb, mrb_value strct) { if (MRB_FROZEN_P(mrb_basic_ptr(strct))) { - mrb_raise(mrb, E_RUNTIME_ERROR, "can't modify frozen struct"); + mrb_raise(mrb, E_FROZEN_ERROR, "can't modify frozen struct"); } mrb_write_barrier(mrb, mrb_basic_ptr(strct)); |
