From 88ed8a0c1376fbe6d45059694ce31db597fde3e9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 14 Apr 2020 11:10:59 -0400 Subject: ruby 2.7 fix --- lib/sisu/db_sqltxt.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sisu/db_sqltxt.rb') diff --git a/lib/sisu/db_sqltxt.rb b/lib/sisu/db_sqltxt.rb index 9f311242..c6c2e301 100644 --- a/lib/sisu/db_sqltxt.rb +++ b/lib/sisu/db_sqltxt.rb @@ -55,7 +55,7 @@ module SiSU_DbText class Prepare def special_character_escape(str) - str=str.gsub(/'/m,"''"). #string.gsub!(/'/,"\047") #string.gsub!(/'/,"\\'") + str=str.to_s.gsub(/'/m,"''"). #string.gsub!(/'/,"\047") #string.gsub!(/'/,"\\'") gsub(/(\\)/m,'\1\1'). #ok but with warnings, double backslash on sqlite #str.gsub!(/[\\]/m,'\\x5C') #ok but with warnings, but not for sqlite #str.gsub!(/(\\)/m,'\1') #ok for sqlite not for pgsql gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/m,"
\n"). gsub(/#{Mx[:tag_o]}\S+?#{Mx[:tag_c]}/m,''). #check -- cgit v1.2.3