From d6624db92608f65b5ba91de8a927916f7b096c5b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 15 Dec 2022 13:55:37 +0900 Subject: [PATCH] [ruby/irb] Prefer to use File.open instead of Kernel.open https://github.com/ruby/irb/commit/ed9e435a6b --- test/irb/test_history.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb index 2ef4bb3373..c74a3a2cb9 100644 --- a/test/irb/test_history.rb +++ b/test/irb/test_history.rb @@ -166,7 +166,7 @@ module TestIRB actual_history = nil Dir.mktmpdir("test_irb_history_") do |tmpdir| ENV["HOME"] = tmpdir - open(IRB.rc_file("_history"), "w") do |f| + File.open(IRB.rc_file("_history"), "w") do |f| f.write(initial_irb_history) end @@ -182,7 +182,7 @@ module TestIRB io.save_history io.load_history - open(IRB.rc_file("_history"), "r") do |f| + File.open(IRB.rc_file("_history"), "r") do |f| actual_history = f.read end end