From 959c398f27ed1d1e0f4456bb8e055c5f9884b2df Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 29 Dec 2018 06:15:28 +0000 Subject: oldweb: work around annoying ERB deprecation in Ruby 2.6 Updated patch by: Takashi Kokubun at https://bugs.ruby-lang.org/issues/15478 --- lib/oldweb.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/oldweb.rb b/lib/oldweb.rb index 910afaf..daa5cc5 100644 --- a/lib/oldweb.rb +++ b/lib/oldweb.rb @@ -269,7 +269,11 @@ class Oldweb erbout = "_erbout_#{file_var}" end - template = klass.new(template, nil, '<>', erbout) + if ERB.instance_method(:initialize).parameters.assoc(:key) + template = klass.new(template, trim_mode: '<>', eoutvar: erbout) + else + template = klass.new(template, nil, '<>', erbout) + end @template_cache[file] = template end -- cgit v1.2.3-24-ge0c7