Apply the upstream PR to support ruby 3.3 Logger
This commit is contained in:
		
							parent
							
								
									91ff5bc8e0
								
							
						
					
					
						commit
						4e8fb62bfb
					
				
							
								
								
									
										39
									
								
								0003-support-ruby33-Logger.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								0003-support-ruby33-Logger.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,39 @@ | ||||
| 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 | ||||
|   | ||||
| @ -7,7 +7,7 @@ | ||||
| Summary: A fast, open source AsciiDoc implementation in Ruby | ||||
| Name: rubygem-%{gem_name} | ||||
| Version: 2.0.20 | ||||
| Release: 3%{?dist} | ||||
| Release: 4%{?dist} | ||||
| License: MIT | ||||
| URL: https://asciidoctor.org | ||||
| Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz | ||||
| @ -17,6 +17,8 @@ Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name | ||||
| Patch0: 0001-use-single-line-block-in-manify-method-in-manpage-co.patch | ||||
| # https://github.com/asciidoctor/asciidoctor/commit/b7c03964 | ||||
| Patch1: 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch | ||||
| # https://github.com/asciidoctor/asciidoctor/pull/4494 | ||||
| Patch2: 0003-support-ruby33-Logger.patch | ||||
| %if 0%{?el7} | ||||
| Requires: ruby(release) | ||||
| BuildRequires: ruby(release) | ||||
| @ -127,6 +129,9 @@ cp -a .%{gem_instdir}/man/*.1 \ | ||||
| %doc %{gem_docdir} | ||||
| 
 | ||||
| %changelog | ||||
| * Fri Sep 29 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.20-4 | ||||
| - Apply the upstream PR to support ruby 3.3 Logger | ||||
| 
 | ||||
| * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-3 | ||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user