[ruby/irb] Fix the error when LC_MESSAGES config value is nil
https://github.com/ruby/irb/commit/6bbde84369
This commit is contained in:
parent
e2b47b832f
commit
f863bc505c
@ -113,7 +113,7 @@ module IRB
|
|||||||
append_history = true
|
append_history = true
|
||||||
end
|
end
|
||||||
|
|
||||||
open(history_file, "#{append_history ? 'a' : 'w'}:#{IRB.conf[:LC_MESSAGES].encoding}", 0600) do |f|
|
File.open(history_file, (append_history ? 'a' : 'w'), 0o600, encoding: IRB.conf[:LC_MESSAGES]&.encoding) do |f|
|
||||||
hist = history.map{ |l| l.split("\n").join("\\\n") }
|
hist = history.map{ |l| l.split("\n").join("\\\n") }
|
||||||
unless append_history
|
unless append_history
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user