summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-12 06:12:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-12 06:12:12 +0000
commit4e41467894ac441cc8d530a8292af69381bcc74e (patch)
treeb488a80ee9a7fb1c6718ca600f1001a252df9d30 /class.c
parentc937bd4a924f4aa20763f05e58d1b82a6062a7d8 (diff)
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
Diffstat (limited to 'class.c')
-rw-r--r--class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class.c b/class.c
index d1a1379..aed3ee4 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;
}