From 58f892fefdfe5563102ab4ccd61b7ff6a3987a55 Mon Sep 17 00:00:00 2001 From: mich <> Date: Tue, 4 Feb 2020 12:38:15 +0900 Subject: [PATCH 1/2] minimal requirement to use CGI.escapeHTML --- lib/csv-diff-report/html.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/csv-diff-report/html.rb b/lib/csv-diff-report/html.rb index 3a77b27..5dc2d01 100644 --- a/lib/csv-diff-report/html.rb +++ b/lib/csv-diff-report/html.rb @@ -1,4 +1,4 @@ -require 'cgi' +require 'cgi/escape' begin require 'lcs-diff' rescue LoadError From d2e0d9361e1422519a1b816098f59b34f42db5d7 Mon Sep 17 00:00:00 2001 From: mich <> Date: Wed, 5 Feb 2020 20:49:06 +0900 Subject: [PATCH 2/2] for old Ruby --- lib/csv-diff-report/html.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/csv-diff-report/html.rb b/lib/csv-diff-report/html.rb index 5dc2d01..3aaabe2 100644 --- a/lib/csv-diff-report/html.rb +++ b/lib/csv-diff-report/html.rb @@ -1,4 +1,9 @@ -require 'cgi/escape' +if RUBY_VERSION >= "2.3.0" + require "cgi/escape" +else + require "cgi/util" +end + begin require 'lcs-diff' rescue LoadError