1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Only untaint line on Ruby <2.7

Untaint is deprecated and has no effect on Ruby 2.7+.
This commit is contained in:
Jeremy Evans 2019-10-18 09:50:07 -07:00 committed by aycabta
parent c6a52cffd1
commit 652800cc09

View file

@ -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