fix that silly mistake that made the percentage plummet

mostly due to the fact that object is a hash now,
not array. Took a while though
This commit is contained in:
Torsten Ruger
2015-07-21 19:41:30 +03:00
parent 2d0424a370
commit e3577d18af
11 changed files with 28 additions and 29 deletions

View File

@ -12,17 +12,17 @@ module Virtual
return unless Virtual.machine.add_object object
#puts "adding #{object.class}"
return unless object.respond_to? :has_layout?
unless object.has_layout?
object.init_layout
end
if( object.is_a? Parfait::Method)
object.source.constants.each{|c| keep(c) }
object.source.constants.each{|c|
puts "keeping constant #{c.class}"
keep(c)
}
end
layout = object.get_layout
keep layout
#puts "Layout #{layout.object_class.name} #{Machine.instance.objects.include?(layout)}"
#puts "Layout #{layout.object_class.name} #{Machine.instance.objects.has_key?(layout.object_id)}"
layout.object_instance_names.each do |name|
inst = object.instance_variable_get "@#{name}".to_sym
inst = object.get_instance_variable name
keep inst
end
if object.is_a? Parfait::List