From da136a3b8c392f3c9e963c55332c55faa6fdd01c Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 25 May 2020 18:56:53 -0500 Subject: [PATCH] Fix for Ruby 2.6+ Ruby 2.6 added a new method named `then` to `Object` which broke us using the method_missing based DSL. Switch to def_attr for then/else to fix this. --- lib/dhall/ast.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dhall/ast.rb b/lib/dhall/ast.rb index 73d0b54..7c4a2fc 100644 --- a/lib/dhall/ast.rb +++ b/lib/dhall/ast.rb @@ -1105,8 +1105,8 @@ module Dhall class If < Expression include(ValueSemantics.for_attributes do predicate Expression - self.then Expression - self.else Expression + def_attr :then, Expression + def_attr :else, Expression end) def as_json -- 2.38.5