diff --git a/lib/parfait/class.rb b/lib/parfait/class.rb index 0308d174..5eeead0d 100644 --- a/lib/parfait/class.rb +++ b/lib/parfait/class.rb @@ -58,10 +58,12 @@ module Parfait # instantiated. By that logic it should maybe be part of vm rather. # On the other hand vague plans to load the hierachy from sof exist, so for now... def set_super_class_name sup + raise "super_class_name must be a name, not #{sup}" unless sup.is_a?(Symbol) self.super_class_name = sup end def super_class + puts "Superclass #{super_class_name}" Parfait::Space.object_space.get_class_by_name(self.super_class_name) end diff --git a/lib/register/boot.rb b/lib/register/boot.rb index adfa7912..e226381d 100644 --- a/lib/register/boot.rb +++ b/lib/register/boot.rb @@ -75,18 +75,13 @@ module Register cl.name = name classes[name] = cl end - object_class = classes[:Object] # superclasses other than default object supers = { :Object => :Kernel , :Kernel => :Value, :Integer => :Value } layout_names.each do |classname , ivar| next if classname == :Value # has no superclass clazz = classes[classname] - super_name = supers[classname] - if super_name - clazz.set_super_class_name classes[super_name] - else - clazz.set_super_class_name object_class - end + super_name = supers[classname] || :Object + clazz.set_super_class_name super_name end end