diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-10-18 09:53:59 -0700 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-11-05 20:57:22 +0900 |
commit | c4b627e2daf76e2f8922c62c8e0a6c2a10c8b435 (patch) | |
tree | 0297b2eb378d4c556c7fbbb1c0427e79d5cd61ef | |
parent | 652800cc09788805368983730c6b25183ae60d92 (diff) |
Only taint on Ruby <2.7
Ruby 2.7 deprecates taint and it no longer has an effect.
-rw-r--r-- | lib/reline.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |