small rename and new test for layout
This commit is contained in:
@ -98,7 +98,7 @@ module Register
|
||||
real_name = clazz_name.to_s.split('_').last.capitalize.to_sym
|
||||
clazz = Parfait::Space.object_space.get_class_by_name(real_name)
|
||||
raise "Class name not given #{real_name}" unless clazz
|
||||
index = clazz.object_layout.index_of( instance_name )
|
||||
index = clazz.object_layout.variable_index( instance_name )
|
||||
raise "Instance name=#{instance_name} not found on #{real_name}" unless index.is_a?(Numeric)
|
||||
return index # the type word is at index 0, but layout is a list and starts at 1 == layout
|
||||
end
|
||||
|
Reference in New Issue
Block a user