mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
c937bd4a92
commit
4e41467894
1 changed files with 1 additions and 1 deletions
2
class.c
2
class.c
|
@ -1619,7 +1619,7 @@ singleton_class_of(VALUE obj)
|
||||||
else {
|
else {
|
||||||
FL_UNSET(klass, FL_TAINT);
|
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;
|
return klass;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue