From 2b1863a18b66b2bbfdfad5ec3b6fc12bc9d1cdca Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 3 Apr 2001 05:43:49 +0000 Subject: * time.c (make_time_t): remove HAVE_TM_ZONE code since it sometimes reports wrong time. * time.c (make_time_t): remove unnecessary range check for platforms where negative time_t is available. * numeric.c (flodivmod): a bug in no fmod case. * process.c (pst_wifsignaled): should apply WIFSIGNALED for status (int), not st (VALUE). * class.c (rb_include_module): module inclusion should be check taints. * class.c (rb_include_module): freeze check at first. * eval.c (rb_attr): sprintf() and rb_intern() moved into conditional body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- class.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'class.c') diff --git a/class.c b/class.c index b5a9a21e42..0845fd4030 100644 --- a/class.c +++ b/class.c @@ -222,6 +222,10 @@ rb_include_module(klass, module) VALUE p; int changed = 0; + rb_frozen_class_p(klass); + if (!OBJ_TAINTED(klass)) { + rb_secure(4); + } if (NIL_P(module)) return; if (klass == module) return; @@ -246,7 +250,6 @@ rb_include_module(klass, module) return; } } - rb_frozen_class_p(klass); RCLASS(klass)->super = include_class_new(module, RCLASS(klass)->super); klass = RCLASS(klass)->super; module = RCLASS(module)->super; -- cgit v1.2.3