From 080bac161fce43ed84dc35eae6bea1169e94bc9c Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 15 Dec 2021 13:33:40 +0100 Subject: [PATCH] logic --- lib/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core.rb b/lib/core.rb index 3283068..8644488 100644 --- a/lib/core.rb +++ b/lib/core.rb @@ -37,7 +37,7 @@ module Rpl needs.each do |need| elt = stack.pop - raise ArgumentError, "Type Error, needed #{need} got #{elt[:type]}" if need != :any && !need.include?( elt[:type] ) + raise ArgumentError, "Type Error, needed #{need} got #{elt[:type]}" unless need == :any || need.include?( elt[:type] ) args << elt end