From 5a59f36d5aabb44d2572c714e6f3605a44be02f8 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Sat, 15 Jun 2019 14:07:20 -0500 Subject: [PATCH] Do not commute generally The operator is commutative, but that doesn't mean x == False should become False == x upon normalization. --- lib/dhall/ast.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dhall/ast.rb b/lib/dhall/ast.rb index 22494b7..be21725 100644 --- a/lib/dhall/ast.rb +++ b/lib/dhall/ast.rb @@ -69,7 +69,7 @@ module Dhall def dhall_eq(other) if self == other Bool.new(value: true) - elsif other.is_a?(Bool) + elsif other == Bool.new(value: true) other.dhall_eq(self) else Operator::Equal.new(lhs: self, rhs: other) -- 2.34.5