From 4e41467894ac441cc8d530a8292af69381bcc74e Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 12 Nov 2016 06:12:12 +0000 Subject: class.c: trivial optimization * class.c (singleton_class_of): just copy FROZEN flag without conditions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'class.c') diff --git a/class.c b/class.c index d1a13798c2..aed3ee42f2 100644 --- a/class.c +++ b/class.c @@ -1619,7 +1619,7 @@ singleton_class_of(VALUE obj) 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; } -- cgit v1.2.1