summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-09 16:55:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-09 16:55:50 +0000
commita404ead89e2f7fd805b1f21609fd0517b317032e (patch)
tree8b471e7e3521aa9c56d0ebffda1b514479637df1 /object.c
parent254004fd9e8ce2f2aca10a2bd5b79288101f84fa (diff)
* string.c (rb_str_reverse_bang): forgot to call rb_str_modify().
* object.c (rb_obj_taint): check frozen status before modifying taint status. * object.c (rb_obj_untaint): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 4e3d5dd..86a246f 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;
}