fixing and testing operators

This commit is contained in:
Torsten Ruger
2015-10-15 09:32:47 +03:00
parent e436581ce8
commit 3d83f203ca
9 changed files with 69 additions and 33 deletions

View File

@ -4,7 +4,7 @@ module Parfait
def initialize type , name , value = nil
raise "not type #{type}" unless Virtual.machine.space.get_class_by_name(type)
self.type , self.name , self.value = type , name , value
self.value = 0 if self.type == :int and value == nil
self.value = 0 if self.type == :Integer and value == nil
raise "must give name for variable" unless name
end
attributes [:type , :name, :value]