need to collect labels for return

so the interpreter can find the object
This commit is contained in:
Torsten Ruger
2015-11-03 11:22:26 +02:00
parent bc414fd3e8
commit 1be5d1862f
2 changed files with 7 additions and 2 deletions

View File

@ -55,8 +55,9 @@ module Register
def add_object o
return false if @objects[o.object_id]
return true if o.is_a? Fixnum
return true if o.is_a? Register::Label
raise "adding non parfait #{o.class}" unless o.is_a? Parfait::Object or o.is_a? Symbol
unless o.is_a? Parfait::Object or o.is_a? Symbol or o.is_a? Register::Label
raise "adding non parfait #{o.class}"
end
@objects[o.object_id] = o
true
end