small to_s changes

This commit is contained in:
Torsten Ruger 2015-10-17 10:03:56 +03:00
parent 4ce4775902
commit 13eb017394
2 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,7 @@ module Register
attr_accessor :array , :index , :register
def to_s
"GetSlot: #{array} [#{index}] -> #{register}"
"GetSlot: #{array}[#{index}] -> #{register}"
end
end

View File

@ -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