olddoc user/dev discussion/patches/bugs/etc
 help / color / mirror / code / Atom feed
* [PATCH] oldweb: work around annoying ERB deprecation in Ruby 2.6
@ 2018-12-29  6:15 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2018-12-29  6:15 UTC (permalink / raw)
  To: olddoc-public

*Sigh* 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..4d948b9 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.version =~ /(\d+\.\d+)/ && $1.to_r >= 2.2
+      template = klass.new(template, trim_mode: '<>', eoutvar: erbout)
+    else
+      template = klass.new(template, nil, '<>', erbout)
+    end
     @template_cache[file] = template
   end
 
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-29  6:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-29  6:15 [PATCH] oldweb: work around annoying ERB deprecation in Ruby 2.6 Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/olddoc.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).