diff options
author | Eric Wong <e@80x24.org> | 2018-12-29 06:15:28 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-02 20:55:59 +0000 |
commit | 959c398f27ed1d1e0f4456bb8e055c5f9884b2df (patch) | |
tree | 64f05d9aa376ea5d8cc110dad140ceab210ce9ab | |
parent | 0bcc282632bd6b58251c3a8494fb840f79f98edc (diff) | |
download | olddoc-959c398f27ed1d1e0f4456bb8e055c5f9884b2df.tar.gz |
Updated patch by: Takashi Kokubun at https://bugs.ruby-lang.org/issues/15478
-rw-r--r-- | lib/oldweb.rb | 6 |
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 |