1 # depends on: kernel.rb module.rb class.rb
3 class IncludedModule < Module
4 self.instance_fields = 8
6 # HACK: make this a VM exported constant
9 ivar_as_index :__ivars__ => 0, :method_table => 1, :method_cache => 2, :name => 3, :constants => 4, :encloser => 5, :superclass => 6, :module => 7
11 def include_kernel_in_object
13 @method_table = Kernel.method_table
16 @constants = Kernel.constant_table
17 @encloser = Kernel.encloser
21 @superclass = Object.direct_superclass
22 Object.superclass = self
26 i = IncludedModule.allocate
27 i.include_kernel_in_object