Skip to content

Commit

Permalink
Use class methods of File over Kernel.open
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Nov 30, 2022
1 parent 367797b commit e0ec5e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/ext/save-history.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def load_history
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?("\\")
Expand Down

0 comments on commit e0ec5e1

Please sign in to comment.