summaryrefslogtreecommitdiff
path: root/lib/reline.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-10-18 09:53:59 -0700
committeraycabta <aycabta@gmail.com>2019-11-05 20:57:22 +0900
commitc4b627e2daf76e2f8922c62c8e0a6c2a10c8b435 (patch)
tree0297b2eb378d4c556c7fbbb1c0427e79d5cd61ef /lib/reline.rb
parent652800cc09788805368983730c6b25183ae60d92 (diff)
Only taint on Ruby <2.7
Ruby 2.7 deprecates taint and it no longer has an effect.
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb4
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