Skip to content

Commit

Permalink
not using magic file descriptor numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
TwP committed Jul 4, 2020
1 parent 7b3525f commit ad246ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/logging/appenders/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def reopen
def open_fd
case self.class.name.split("::").last.downcase
when "stdout"
fd = 1
fd = STDOUT.fileno
encoding = STDOUT.external_encoding
when "stderr"
fd = 2
fd = STDERR.fileno
encoding = STDERR.external_encoding
else
raise RuntimeError, "Please do not use the `Logging::Appenders::Console` class directly - " +
Expand Down

0 comments on commit ad246ec

Please sign in to comment.