critical bug from array/list mix up

This commit is contained in:
Torsten Ruger 2015-07-26 18:27:54 +03:00
parent b0c78479ff
commit e7b8f2fcc8

View File

@ -100,7 +100,7 @@ module Register
raise "Class name not given #{real_name}" unless clazz raise "Class name not given #{real_name}" unless clazz
index = clazz.object_layout.index_of( instance_name ) index = clazz.object_layout.index_of( instance_name )
raise "Instance name=#{instance_name} not found on #{real_name}" unless index.is_a?(Numeric) raise "Instance name=#{instance_name} not found on #{real_name}" unless index.is_a?(Numeric)
return index + 1 # one for the type word that is at index 0 return index # the type word is at index 0, but layout is a list and starts at 1 == layout
end end
# if a symbol is given, it may be one of the four objects that the vm knows. # if a symbol is given, it may be one of the four objects that the vm knows.