small checks

This commit is contained in:
Torsten Ruger
2015-08-06 18:27:25 +03:00
parent c0071c947d
commit 2c6ca7b4f2
4 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ module Virtual
# from may be a Constant (Object,Integer,String,Class)
class Set < Instruction
def initialize from , to
raise "no to slot #{to}" unless to.is_a? Slot
@from = from
@to = to
end