summaryrefslogtreecommitdiff
path: root/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-07 17:30:28 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-07 17:30:28 +0100
commitdebb2c431b40a6b4750a39956cc5fcfa5a4a6476 (patch)
tree5c5fceb399f1dddaf02d4d8da8f674106cede374 /dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch
parenta17b25a10359070f9527893d861369d378021aa9 (diff)
gentoo auto-resync : 07:04:2023 - 17:30:27
Diffstat (limited to 'dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch')
-rw-r--r--dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch b/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch
new file mode 100644
index 000000000000..86e577c796ec
--- /dev/null
+++ b/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch
@@ -0,0 +1,29 @@
+https://github.com/asciidoctor/asciidoctor/commit/b3c05398b1b4b483fe5f9c9ef89dc772863cf6f1
+https://src.fedoraproject.org/rpms/rubygem-asciidoctor/raw/rawhide/f/0001-resolves-4390-fix-call-order-so-use-of-an-include-fi.patch
+
+From b3c05398b1b4b483fe5f9c9ef89dc772863cf6f1 Mon Sep 17 00:00:00 2001
+From: Dan Allen <dan.j.allen@gmail.com>
+Date: Mon, 20 Feb 2023 23:47:59 -0700
+Subject: [PATCH] resolves #4390 fix call order so use of an include file with
+ invalid encoding continues to raise error when using Ruby >= 3.2.0
+
+--- a/lib/asciidoctor/reader.rb
++++ b/lib/asciidoctor/reader.rb
+@@ -1197,15 +1197,16 @@ def preprocess_include_directive target, attrlist
+ push_include inc_lines, inc_path, relpath, inc_offset, parsed_attrs
+ end
+ else
++ inc_content = nil
+ begin
+ # NOTE read content before shift so cursor is only advanced if IO operation succeeds
+ inc_content = reader.call(inc_path, read_mode) {|f| f.read }
+ shift
+- push_include inc_content, inc_path, relpath, 1, parsed_attrs
+ rescue
+ logger.error message_with_context %(include #{target_type} not readable: #{inc_path}), source_location: cursor
+ return replace_next_line %(Unresolved directive in #{@path} - include::#{expanded_target}[#{attrlist}])
+ end
++ push_include inc_content, inc_path, relpath, 1, parsed_attrs
+ end
+ true
+ end