Compatibility with old Ruby versions

This commit is contained in:
Matthias Koefferlein 2024-04-29 00:10:57 +02:00
parent bc2028cedb
commit a7f0f3ba8e
1 changed files with 12 additions and 2 deletions

View File

@ -3253,9 +3253,19 @@ CODE
categories.each do |c|
ccat = nil
if cat
ccat = cat.each_sub_category.find { |i| i.name == c }
cat.each_sub_category do |i|
if i.name == c
ccat = i
break
end
end
else
ccat = output_rdb.each_category.find { |i| i.name == c }
output_rdb.each_category do |i|
if i.name == c
ccat = i
break
end
end
end
cat = ccat ? ccat : output_rdb.create_category(cat, c)
end