From 9b8c30e0c8d04b66c4415c27041423b372c14066 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 11 Apr 2018 16:08:34 -0700 Subject: [PATCH] compat/extend/string: fix odisabled return. `odisabled` will still return for a formula in `.brew`. This means `EOS.undent` returns `nil` and the formula cannot be parsed. Instead return the actual string in this case to avoid e.g. patches blowing up with `nil` strings. Fixes #4049. --- Library/Homebrew/compat/extend/string.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/compat/extend/string.rb b/Library/Homebrew/compat/extend/string.rb index 0795ab376a..b704cd2b5f 100644 --- a/Library/Homebrew/compat/extend/string.rb +++ b/Library/Homebrew/compat/extend/string.rb @@ -1,6 +1,7 @@ class String def undent odisabled "<<-EOS.undent", "<<~EOS" + self end alias unindent undent