EVAL can eval anything

This commit is contained in:
Gwenhael Le Moine 2021-12-09 16:32:03 +01:00
parent dca6825602
commit f3ca267a93
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -35,7 +35,7 @@ module Rpl
# similar to if-then-else-end, <test-instruction> <true-instruction> <false-instruction> ifte
def ifte( stack, dictionary )
stack, args = Rpl::Lang::Core.stack_extract( stack, [%i[program word], %i[program word], %i[boolean]] )
stack, args = Rpl::Lang::Core.stack_extract( stack, [:any, :any, %i[boolean]] )
stack << args[ args[2][:value] ? 1 : 0 ]