40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
From 4c93df1eeff84463c6fc299b62b78c20c3163a09 Mon Sep 17 00:00:00 2001
|
|
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
|
Date: Fri, 29 Sep 2023 15:00:12 +0900
|
|
Subject: [PATCH] Support ruby3.3 Logger by properly initialize super class
|
|
|
|
Upcoming ruby3.3 will have enhanced Logger class:
|
|
https://github.com/ruby/ruby/commit/194520f80e1cdb71faa055d731450855a1ddb8d1
|
|
which initializes newly added instance variables.
|
|
Without initializing such variables (in super class), now using
|
|
subclass of Logger will cause exception.
|
|
|
|
To avoid this, first call super, then execute additional subclass
|
|
initialization.
|
|
|
|
Closes #4493 .
|
|
---
|
|
lib/asciidoctor/logging.rb | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/lib/asciidoctor/logging.rb b/lib/asciidoctor/logging.rb
|
|
index 7664c7e75d..1f846c4fba 100644
|
|
--- a/lib/asciidoctor/logging.rb
|
|
+++ b/lib/asciidoctor/logging.rb
|
|
@@ -42,6 +42,7 @@ class MemoryLogger < ::Logger
|
|
attr_reader :messages
|
|
|
|
def initialize
|
|
+ super nil
|
|
self.level = WARN
|
|
@messages = []
|
|
end
|
|
@@ -69,6 +70,7 @@ class NullLogger < ::Logger
|
|
attr_reader :max_severity
|
|
|
|
def initialize
|
|
+ super nil
|
|
self.level = WARN
|
|
end
|
|
|