From c4b627e2daf76e2f8922c62c8e0a6c2a10c8b435 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 18 Oct 2019 09:53:59 -0700 Subject: Only taint on Ruby <2.7 Ruby 2.7 deprecates taint and it no longer has an effect. --- lib/reline.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/reline.rb') diff --git a/lib/reline.rb b/lib/reline.rb index 0873e9bcc3..f7678074de 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -166,7 +166,7 @@ module Reline inner_readline(prompt, add_hist, true, &confirm_multiline_termination) whole_buffer = line_editor.whole_buffer.dup - whole_buffer.taint + whole_buffer.taint if RUBY_VERSION < '2.7' if add_hist and whole_buffer and whole_buffer.chomp.size > 0 Reline::HISTORY << whole_buffer end @@ -179,7 +179,7 @@ module Reline inner_readline(prompt, add_hist, false) line = line_editor.line.dup - line.taint + line.taint if RUBY_VERSION < '2.7' if add_hist and line and line.chomp.size > 0 Reline::HISTORY << line.chomp end -- cgit v1.2.3