Open supertassu opened 1 year ago
This seems to be an issue with a newer Ruby version, not with a newer Puppet version. The following patch seems to fix it, but I'm not very familiar with Ruby and therefore not sure if it's the correct or proper fix:
diff --git a/lib/octocatalog-diff/catalog-diff/filter/compilation_dir.rb b/lib/octocatalog-diff/catalog-diff/filter/compilation_dir.rb
index 5e2747d..b105f8a 100644
--- a/lib/octocatalog-diff/catalog-diff/filter/compilation_dir.rb
+++ b/lib/octocatalog-diff/catalog-diff/filter/compilation_dir.rb
@@ -66,12 +66,12 @@ module OctocatalogDiff
value
end
- def traverse(a)
+ def traverse(a, &proc)
case a
when Array
- a.map { |v| traverse(v, &Proc.new) }
+ a.map { |v| traverse(v, &proc) }
when Hash
- traverse(a.values, &Proc.new)
+ traverse(a.values, &proc)
else
yield a
end
I can confirm the problem, also seeing it with ruby 3.1.2p20 (as present in Debian/bookworm) and puppet-agent v7.23.0-1bullseye (from puppetlabs upstream).
Thanks @supertassu for providing a patch, this also works for me!
/usr/lib/ruby/vendor_ruby/octocatalog-diff/catalog-diff/filter/compilation_dir.rb:72:in
new': tried to create Proc object without a block (ArgumentError)`ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux-gnu]
7.20.0
, the open source version as packaged in Debianoctocatalog-diff 2.1.0-1
, again installed from the packages in Debian repositoriesNo,