From 6f484e4930be69c58462dd11c97663e6c8488b8e Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 3 Sep 2002 05:20:14 +0000 Subject: * variable.c (rb_copy_generic_ivar): remove old generic instance variable table if it existes. * class.c (rb_make_metaclass): metaclass of a metaclass is a metaclass itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'io.c') diff --git a/io.c b/io.c index 7de74befde..28cb8a51c7 100644 --- a/io.c +++ b/io.c @@ -177,6 +177,7 @@ rb_io_taint_check(io) { if (!OBJ_TAINTED(io) && rb_safe_level() >= 4) rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO"); + rb_check_frozen(io); return io; } @@ -2270,6 +2271,7 @@ rb_io_become(clone, io) char *mode; io = rb_io_get_io(io); + if (clone == io) return clone; GetOpenFile(io, orig); MakeOpenFile(clone, fptr); -- cgit v1.2.3