summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-18 08:43:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-18 08:43:14 +0000
commit0b3092922d0ff12923852e64e9146f99d6191287 (patch)
tree83fdd95738b0470346716b47dcb3ffdac299764a /object.c
parent24a286efe1049d140869bb5ecd9acdc81ec833a0 (diff)
* io.c (rb_io_s_read): new method to call IO#read from
pathname. In addition, it accepts third optional argument to specify starting point. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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");
}