summaryrefslogtreecommitdiff
path: root/lib/irb/ext/save-history.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-30 19:11:42 +0900
committergit <svn-admin@ruby-lang.org>2022-11-30 10:18:57 +0000
commitd532d27507678daa400e1e0ed3da3c014cd38f27 (patch)
tree1c62db99bafe83f25d41b7cf5f1054518b847b4b /lib/irb/ext/save-history.rb
parentcf3b305c43b81161c2c9bdfba48823ecf7e41c6c (diff)
[ruby/irb] Use class methods of `File` over `Kernel.open`
https://github.com/ruby/irb/commit/e0ec5e1bd8
Diffstat (limited to 'lib/irb/ext/save-history.rb')
-rw-r--r--lib/irb/ext/save-history.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb
index a74b89f8c3..9e7620545a 100644
--- a/lib/irb/ext/save-history.rb
+++ b/lib/irb/ext/save-history.rb
@@ -70,7 +70,7 @@ module IRB
end
history_file = IRB.rc_file("_history") unless history_file
if File.exist?(history_file)
- open(history_file, "r:#{IRB.conf[:LC_MESSAGES].encoding}") do |f|
+ File.open(history_file, "r:#{IRB.conf[:LC_MESSAGES].encoding}") do |f|
f.each { |l|
l = l.chomp
if self.class == RelineInputMethod and history.last&.end_with?("\\")