From 5b864dcb580ba05525d8db6f72ec170b80c2fec9 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Sun, 9 Jun 2019 15:09:30 +0200 Subject: [PATCH] =?UTF-8?q?evaluate()=E2=80=99s=20substitutions=20are=20no?= =?UTF-8?q?w=20global.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cr b/src/main.cr index 4b4692f..e0f51a5 100644 --- a/src/main.cr +++ b/src/main.cr @@ -261,7 +261,7 @@ class Service ENV["SERVICE_ENVIRONMENT_TYPE"] = @environment.type.to_s end private def evaluate(string) - string.sub /%{[a-zA-Z]+}/ do |match| + string.gsub /%{[a-zA-Z]+}/ do |match| match = match[2..match.size-2] if match.downcase == "environment"