From e7b8f2fcc85bc002b766385affc392b10dc9439d Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sun, 26 Jul 2015 18:27:54 +0300 Subject: [PATCH] critical bug from array/list mix up --- lib/register/register_reference.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/register/register_reference.rb b/lib/register/register_reference.rb index 2cf2c1cd..57171665 100644 --- a/lib/register/register_reference.rb +++ b/lib/register/register_reference.rb @@ -100,7 +100,7 @@ module Register raise "Class name not given #{real_name}" unless clazz index = clazz.object_layout.index_of( instance_name ) 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 # if a symbol is given, it may be one of the four objects that the vm knows.