summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/object.c b/object.c
index 4e3d5dd856..86a246f1c3 100644
--- a/object.c
+++ b/object.c
@@ -286,6 +286,9 @@ rb_obj_taint(obj)
VALUE obj;
{
rb_secure(4);
+ if (OBJ_FROZEN(obj)) {
+ rb_error_frozen("object");
+ }
OBJ_TAINT(obj);
return obj;
}
@@ -295,6 +298,9 @@ rb_obj_untaint(obj)
VALUE obj;
{
rb_secure(3);
+ if (OBJ_FROZEN(obj)) {
+ rb_error_frozen("object");
+ }
FL_UNSET(obj, FL_TAINT);
return obj;
}