Skip to content

Commit

Permalink
fix “tried to create Proc object without a block” on Ruby 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mxey committed Jul 15, 2024
1 parent 5f93957 commit b7b36aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/octocatalog-diff/catalog-diff/filter/compilation_dir.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def remove_compilation_dir(v, dir)
value
end

def traverse(a)
def traverse(a, &p)
case a
when Array
a.map { |v| traverse(v, &Proc.new) }
a.map { |v| traverse(v, &p) }
when Hash
traverse(a.values, &Proc.new)
traverse(a.values, &p)
else
yield a
end
Expand Down

0 comments on commit b7b36aa

Please sign in to comment.