summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-15 13:55:37 +0900
committergit <svn-admin@ruby-lang.org>2022-12-16 01:10:46 +0000
commitd6624db92608f65b5ba91de8a927916f7b096c5b (patch)
tree9dd4c96fe5eaaa0a33507bbe994f1b5db7ebb28d /test/irb
parentae19ac5b5ba1e613a788addeb6d4d67fa65f6518 (diff)
downloadruby-d6624db92608f65b5ba91de8a927916f7b096c5b.tar.gz
[ruby/irb] Prefer to use File.open instead of Kernel.open
https://github.com/ruby/irb/commit/ed9e435a6b
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_history.rb4
1 files 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