diff options
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -813,6 +813,13 @@ rb_error_frozen(what) rb_raise(rb_eTypeError, "can't modify frozen %s", what); } +void +rb_check_frozen(obj) + VALUE obj; +{ + if (OBJ_FROZEN(obj)) rb_error_frozen(rb_class2name(CLASS_OF(obj))); +} + static void init_syserr() { |