summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/error.c b/error.c
index 6a4641f..ed2d522 100644
--- a/error.c
+++ b/error.c
@@ -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()
{