summaryrefslogtreecommitdiff
path: root/dev-ruby/safe_yaml/files/safe_yaml-1.0.5-ruby30-arity.patch
blob: e994a48bbecb63a3f9985d89177cb82bb3ef7c49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Daniel Leidert <dleidert@debian.org>
Date: Wed, 1 Dec 2021 18:51:51 +0100
Subject: Fix Rubx 3 compatibility

Origin: https://github.com/dtao/safe_yaml/compare/master...paolobrasolin:development
Bug: https://github.com/dtao/safe_yaml/issues/100
---
 lib/safe_yaml/safe_to_ruby_visitor.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/safe_yaml/safe_to_ruby_visitor.rb b/lib/safe_yaml/safe_to_ruby_visitor.rb
index b980445..5fd71f0 100644
--- a/lib/safe_yaml/safe_to_ruby_visitor.rb
+++ b/lib/safe_yaml/safe_to_ruby_visitor.rb
@@ -4,7 +4,7 @@ module SafeYAML
 
     def initialize(resolver)
       case INITIALIZE_ARITY
-      when 2
+      when 2, -3
         # https://github.com/tenderlove/psych/blob/v2.0.0/lib/psych/visitors/to_ruby.rb#L14-L28
         loader  = Psych::ClassLoader.new
         scanner = Psych::ScalarScanner.new(loader)