mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
[ruby/logger] Let Logger#reopen not raise on nil log devices
da7bf844e5
This commit is contained in:
parent
f3e12caa08
commit
ae93ebae67
2 changed files with 8 additions and 1 deletions
|
@ -410,7 +410,7 @@ class Logger
|
|||
# Reopen a log device.
|
||||
#
|
||||
def reopen(logdev = nil)
|
||||
@logdev.reopen(logdev)
|
||||
@logdev&.reopen(logdev)
|
||||
self
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue