diff --git a/lib/register/instructions/get_slot.rb b/lib/register/instructions/get_slot.rb index 95adc500..9bb04956 100644 --- a/lib/register/instructions/get_slot.rb +++ b/lib/register/instructions/get_slot.rb @@ -30,7 +30,7 @@ module Register attr_accessor :array , :index , :register def to_s - "GetSlot: #{array} [#{index}] -> #{register}" + "GetSlot: #{array}[#{index}] -> #{register}" end end diff --git a/lib/register/register_value.rb b/lib/register/register_value.rb index d1f2823f..4a1890e9 100644 --- a/lib/register/register_value.rb +++ b/lib/register/register_value.rb @@ -17,7 +17,9 @@ module Register end def to_s - "#{symbol}:#{type}:#{value}" + s = "#{symbol}:#{type}" + s += ":#{value}" if value + s end def self.look_like_reg is_it