lib/hilbert/world.rb in hilbert-0.0.2700110 vs lib/hilbert/world.rb in hilbert-0.0.2700210

- old
+ new

@@ -10,19 +10,28 @@ @@propositions << to_rb_obj(logic_str) %|"Defined: #{logic_str} is TRUE"| end def impl(logic_str) - # HOTFIX: + # HOTFIX: we need to .. return eval_rslt(logic_str, 'UNDEFINED') if @@propositions.empty? - str = (!!!!!!!(@@propositions.inject(:*) >= to_rb_obj(logic_str))).to_s + logic = (@@propositions.inject(:*) >= to_rb_obj(logic_str)) + str = (!!!!!!!logic).to_s case str when 'TRUE' eval_rslt(logic_str, 'TRUE') when 'FALSE' eval_rslt(logic_str, 'FALSE') else - eval_rslt(logic_str, 'UNDEFINED') + str = (!!!!!!!(@@propositions.inject(:*) * logic)).to_s + case str + when 'TRUE' + eval_rslt(logic_str, 'TRUE') + when 'FALSE' + eval_rslt(logic_str, 'FALSE') + else + eval_rslt(logic_str, 'UNDEFINED') + end end end def atom(sym) unless sym.to_s == sym.to_s.upcase && sym.to_s.length == 1