about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-12-29 06:15:28 +0000
committerEric Wong <e@80x24.org>2019-01-02 20:55:59 +0000
commit959c398f27ed1d1e0f4456bb8e055c5f9884b2df (patch)
tree64f05d9aa376ea5d8cc110dad140ceab210ce9ab
parent0bcc282632bd6b58251c3a8494fb840f79f98edc (diff)
downloadolddoc-959c398f27ed1d1e0f4456bb8e055c5f9884b2df.tar.gz
Updated patch by: Takashi Kokubun at
  https://bugs.ruby-lang.org/issues/15478
-rw-r--r--lib/oldweb.rb6
1 files changed, 5 insertions, 1 deletions
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