summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/object.c b/object.c
index 6ded7b0..159198f 100644
--- a/object.c
+++ b/object.c
@@ -288,7 +288,7 @@ rb_obj_taint(obj)
VALUE obj;
{
rb_secure(4);
- if (OBJ_TAINTED(obj)) {
+ if (!OBJ_TAINTED(obj)) {
if (OBJ_FROZEN(obj)) {
rb_error_frozen("object");
}
@@ -302,7 +302,7 @@ rb_obj_untaint(obj)
VALUE obj;
{
rb_secure(3);
- if (!OBJ_TAINTED(obj)) {
+ if (OBJ_TAINTED(obj)) {
if (OBJ_FROZEN(obj)) {
rb_error_frozen("object");
}
@@ -315,7 +315,7 @@ VALUE
rb_obj_freeze(obj)
VALUE obj;
{
- if (OBJ_FROZEN(obj)) {
+ if (!OBJ_FROZEN(obj)) {
if (rb_safe_level() >= 4 && !OBJ_TAINTED(obj)) {
rb_raise(rb_eSecurityError, "Insecure: can't freeze object");
}