mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[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
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ module IRB
|
|||
append_history = true
|
||||
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") }
|
||||
unless append_history
|
||||
begin
|
||||
|
|
Loading…
Reference in a new issue