Skip to content

Commit

Permalink
Only untaint line on Ruby <2.7
Browse files Browse the repository at this point in the history
Untaint is deprecated and has no effect on Ruby 2.7+.
  • Loading branch information
jeremyevans authored and aycabta committed Nov 5, 2019
1 parent c6a52cf commit 652800c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb.rb
Expand Up @@ -536,7 +536,7 @@ def eval_input
@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
Expand Down

0 comments on commit 652800c

Please sign in to comment.