summaryrefslogtreecommitdiff
path: root/repo/ronn/fix-ruby-3.1-compat.patch
blob: 233da9d0c1792512244c25cb0d257003955b7feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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']],