[前][次][番号順一覧][スレッド一覧]

ruby-changes:58583

From: Jeremy <ko1@a...>
Date: Tue, 5 Nov 2019 20:56:00 +0900 (JST)
Subject: [ruby-changes:58583] 652800cc09 (master): Only untaint line on Ruby <2.7

https://git.ruby-lang.org/ruby.git/commit/?id=652800cc09

From 652800cc09788805368983730c6b25183ae60d92 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Fri, 18 Oct 2019 09:50:07 -0700
Subject: Only untaint line on Ruby <2.7

Untaint is deprecated and has no effect on Ruby 2.7+.

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 https://github.com/ruby/ruby/blob/trunk/lib/irb.rb#L536
       @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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]