ruby-changes:12979
From: yugui <ko1@a...>
Date: Mon, 31 Aug 2009 16:22:14 +0900 (JST)
Subject: [ruby-changes:12979] Ruby:r24721 (trunk): * class.c (make_singleton_class): variable name changed.
yugui 2009-08-31 16:21:54 +0900 (Mon, 31 Aug 2009) New Revision: 24721 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24721 Log: * class.c (make_singleton_class): variable name changed. removed an unnecessary conditional. Modified files: trunk/ChangeLog trunk/class.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24720) +++ ChangeLog (revision 24721) @@ -1,3 +1,8 @@ +Mon Aug 31 16:20:41 2009 Yuki Sonoda (Yugui) <yugui@y...> + + * class.c (make_singleton_class): variable name changed. + removed an unnecessary conditional. + Mon Aug 31 14:17:09 2009 Yuki Sonoda (Yugui) <yugui@y...> * class.c: refactored singleton class related matters. Index: class.c =================================================================== --- class.c (revision 24720) +++ class.c (revision 24721) @@ -298,19 +298,14 @@ static inline VALUE make_singleton_class(VALUE obj) { - VALUE metasuper; - VALUE super = RBASIC(obj)->klass; - VALUE klass = rb_class_boot(super); + VALUE orig_class = RBASIC(obj)->klass; + VALUE klass = rb_class_boot(orig_class); FL_SET(klass, FL_SINGLETON); RBASIC(obj)->klass = klass; rb_singleton_class_attached(klass, obj); - metasuper = RBASIC(rb_class_real(super))->klass; - /* metaclass of a superclass may be NULL at boot time */ - if (metasuper) { - RBASIC(klass)->klass = metasuper; - } + METACLASS_OF(klass) = METACLASS_OF(rb_class_real(orig_class)); return klass; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/