mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Stop exposing FrozenCore in headers
Revert commit "Directly allocate FrozenCore as an ICLASS",
813a5f4fc4
.
This commit is contained in:
parent
b33e9f637d
commit
4634405f7c
3 changed files with 7 additions and 11 deletions
10
class.c
10
class.c
|
@ -1128,16 +1128,10 @@ rb_define_module_id_under(VALUE outer, ID id)
|
|||
return module;
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_iclass_alloc(VALUE klass)
|
||||
{
|
||||
return class_alloc(T_ICLASS, klass);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_include_class_new(VALUE module, VALUE super)
|
||||
{
|
||||
VALUE klass = rb_iclass_alloc(rb_cClass);
|
||||
VALUE klass = class_alloc(T_ICLASS, rb_cClass);
|
||||
|
||||
RCLASS_M_TBL(klass) = RCLASS_M_TBL(module);
|
||||
|
||||
|
@ -1414,7 +1408,7 @@ ensure_origin(VALUE klass)
|
|||
{
|
||||
VALUE origin = RCLASS_ORIGIN(klass);
|
||||
if (origin == klass) {
|
||||
origin = rb_iclass_alloc(klass);
|
||||
origin = class_alloc(T_ICLASS, klass);
|
||||
RCLASS_SET_SUPER(origin, RCLASS_SUPER(klass));
|
||||
RCLASS_SET_SUPER(klass, origin);
|
||||
RCLASS_SET_ORIGIN(klass, origin);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue