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

ruby-changes:58585

From: Jeremy <ko1@a...>
Date: Tue, 5 Nov 2019 21:07:40 +0900 (JST)
Subject: [ruby-changes:58585] c4b627e2da (master): Only taint on Ruby <2.7

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

From c4b627e2daf76e2f8922c62c8e0a6c2a10c8b435 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Fri, 18 Oct 2019 09:53:59 -0700
Subject: Only taint on Ruby <2.7

Ruby 2.7 deprecates taint and it no longer has an effect.

diff --git a/lib/reline.rb b/lib/reline.rb
index 0873e9b..f767807 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -166,7 +166,7 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L166
       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 https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L179
       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
-- 
cgit v0.10.2


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

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