summaryrefslogtreecommitdiff
path: root/repo/ronn/fix-ruby-3.1-compat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'repo/ronn/fix-ruby-3.1-compat.patch')
-rw-r--r--repo/ronn/fix-ruby-3.1-compat.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/repo/ronn/fix-ruby-3.1-compat.patch b/repo/ronn/fix-ruby-3.1-compat.patch
new file mode 100644
index 0000000..233da9d
--- /dev/null
+++ b/repo/ronn/fix-ruby-3.1-compat.patch
@@ -0,0 +1,24 @@
+Patch-Source: https://github.com/apjanke/ronn-ng/issues/80
+
+--- a/lib/ronn/document.rb.orig
++++ b/lib/ronn/document.rb
+@@ -289,7 +289,7 @@
+
+ def to_yaml
+ require 'yaml'
+- to_h.to_yaml
++ to_h.merge('date' => date.to_s).to_yaml
+ end
+
+ def to_json(*_args)
+--- a/test/test_ronn_document.rb
++++ b/test/test_ronn_document.rb
+@@ -140,7 +140,7 @@ class DocumentTest < Test::Unit::TestCase
+ assert_equal({
+ 'section' => '1',
+ 'name' => 'hello',
+- 'date' => @now,
++ 'date' => @now.to_s,
+ 'tagline' => 'hello world',
+ 'styles' => ['man'],
+ 'toc' => [['NAME', 'NAME']],