From ba8fc117c58e66672b4638450e76911e42a80f7b Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 13 Feb 2002 09:01:11 +0000 Subject: * parse.y (stmt): local variable declaration order was changed since 1.6 * parse.y (arg): ditto. * pack.c (pack_pack): add templates 'q' and 'Q'. * pack.c (pack_unpack): ditto. * bignum.c (rb_quad_pack): new utility function. * bignum.c (rb_quad_unpack): ditto. * parse.y (assignable): should emit CVASGN within the method body. * dir.c (dir_s_glob): should not warn even if no match found. * eval.c (rb_eval): clean up class variable behavior. * eval.c (assign): ditto. * eval.c (is_defined): ditto. * variable.c (rb_mod_class_variables): need not to call rb_cvar_singleton(). * variable.c (rb_cvar_singleton): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- variable.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'variable.c') diff --git a/variable.c b/variable.c index 1c7a2601e0..656497e742 100644 --- a/variable.c +++ b/variable.c @@ -1411,20 +1411,6 @@ rb_define_global_const(name, val) rb_define_const(rb_cObject, name, val); } -VALUE -rb_cvar_singleton(obj) - VALUE obj; -{ - switch (TYPE(obj)) { - case T_MODULE: - case T_CLASS: - return obj; - default: - break; - } - return CLASS_OF(obj); -} - static VALUE original_module(c) VALUE c; @@ -1613,10 +1599,6 @@ rb_mod_class_variables(obj) { VALUE ary = rb_ary_new(); - if (FL_TEST(obj, FL_SINGLETON)) { - obj = rb_cvar_singleton(rb_iv_get(obj, "__attached__")); - } - for (;;) { if (RCLASS(obj)->iv_tbl) { st_foreach(RCLASS(obj)->iv_tbl, cv_i, ary); -- cgit v1.2.3