summaryrefslogtreecommitdiff
path: root/lib/irb.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-10-18 09:50:07 -0700
committeraycabta <aycabta@gmail.com>2019-11-05 20:54:46 +0900
commit652800cc09788805368983730c6b25183ae60d92 (patch)
tree7ea27c162aa635c03d2b1f03c109b1a6218a8543 /lib/irb.rb
parentc6a52cffd13a42b4c95ccbdf7e32a7da25e494b7 (diff)
Only untaint line on Ruby <2.7
Untaint is deprecated and has no effect on Ruby 2.7+.
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index e95927f..97af046 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -536,7 +536,7 @@ module IRB
@scanner.each_top_level_statement do |line, line_no|
signal_status(:IN_EVAL) do
begin
- line.untaint
+ line.untaint if RUBY_VERSION < '2.7'
@context.evaluate(line, line_no, exception: exc)
output_value if @context.echo? && (@context.echo_on_assignment? || !assignment_expression?(line))
rescue Interrupt => exc