fix argument indexing

good old index bug, off by one
this time forgot about parfait 1-indexing
This commit is contained in:
Torsten Ruger
2018-03-30 20:01:31 +03:00
parent b997f01236
commit ee8b9469af
4 changed files with 56 additions and 8 deletions

View File

@ -68,8 +68,8 @@ module Vool
mom_receive = @receiver.slot_definition(in_method)
arg_target = [:message , :next_message , :arguments]
args = []
@arguments.each_with_index do |arg , index| # +1 because of type
args << Mom::SlotLoad.new( arg_target + [index+1] , arg.slot_definition(in_method))
@arguments.each_with_index do |arg , index| # +1 because of type, + 1 beacuse 1-indexed
args << Mom::SlotLoad.new( arg_target + [index+1+1] , arg.slot_definition(in_method))
end
setup << Mom::ArgumentTransfer.new( mom_receive , args )
end