diff --git a/lib/register/parfait_adapter.rb b/lib/register/parfait_adapter.rb index e38e3c9e..3dc0bd48 100644 --- a/lib/register/parfait_adapter.rb +++ b/lib/register/parfait_adapter.rb @@ -133,7 +133,7 @@ module Parfait string = "" index = 1 while( index <= self.char_length) - string[index - 1] = get_char(index).chr + string += get_char(index).chr index = index + 1 end string diff --git a/test/compiler/statements/helper.rb b/test/compiler/statements/helper.rb index 43f2cf88..3ae418de 100644 --- a/test/compiler/statements/helper.rb +++ b/test/compiler/statements/helper.rb @@ -30,7 +30,7 @@ module Statements str.gsub!("Register::","") ret = "" str.split(",").each_slice(7).each do |line| - ret += " " + line.join(",") + " ,\n" + ret += " " + line.join(",") + " ,\n" end ret end diff --git a/test/compiler/statements/test_fields.rb b/test/compiler/statements/test_fields.rb index 59faef9a..5d82922f 100644 --- a/test/compiler/statements/test_fields.rb +++ b/test/compiler/statements/test_fields.rb @@ -14,7 +14,7 @@ class Object end end HERE - @expect = [Label, GetSlot, SetSlot, Label, FunctionReturn] + @expect = [Label, GetSlot, GetSlot, GetSlot, SetSlot, Label, FunctionReturn] check end @@ -60,8 +60,8 @@ class Object end end HERE - @expect = [Label, GetSlot, SetSlot, GetSlot, GetSlot, SetSlot, Label , - FunctionReturn] + @expect = [Label, RegisterTransfer, GetSlot, GetSlot, SetSlot, GetSlot, GetSlot , + SetSlot, Label, FunctionReturn] check end end