ruby-changes:44668
From: nobu <ko1@a...>
Date: Sat, 12 Nov 2016 15:22:06 +0900 (JST)
Subject: [ruby-changes:44668] nobu:r56739 (trunk): class.c: trivial optimization
nobu 2016-11-12 15:12:12 +0900 (Sat, 12 Nov 2016) New Revision: 56739 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56739 Log: class.c: trivial optimization * class.c (singleton_class_of): just copy FROZEN flag without conditions. Modified files: trunk/class.c Index: class.c =================================================================== --- class.c (revision 56738) +++ class.c (revision 56739) @@ -1619,7 +1619,7 @@ singleton_class_of(VALUE obj) https://github.com/ruby/ruby/blob/trunk/class.c#L1619 else { FL_UNSET(klass, FL_TAINT); } - if (OBJ_FROZEN(obj)) OBJ_FREEZE_RAW(klass); + RB_FL_SET_RAW(klass, RB_OBJ_FROZEN_RAW(obj)); return klass; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/