extracting from stack in 2 steps to leave stack intact in case of error
This commit is contained in:
parent
b8724a4a1c
commit
e9e44f7d69
1 changed files with 2 additions and 1 deletions
|
@ -155,7 +155,8 @@ class Interpreter
|
|||
args = []
|
||||
needs.each do |need|
|
||||
raise ArgumentError, "Type Error, needed #{need} got #{elt[:type]}" unless need == :any || need.include?( @stack.last[:type] )
|
||||
|
||||
end
|
||||
needs.each do # rubocop:disable Style/CombinableLoops
|
||||
args << @stack.pop
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue