mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Fix arg_array on empty
This commit is contained in:
parent
0438572c58
commit
172fc72fa9
1 changed files with 7 additions and 3 deletions
|
@ -428,9 +428,13 @@ def number_with_separator(number)
|
||||||
end
|
end
|
||||||
|
|
||||||
def arg_array(array, start = 1)
|
def arg_array(array, start = 1)
|
||||||
|
if array.size == 0
|
||||||
|
args = "NULL"
|
||||||
|
else
|
||||||
args = [] of String
|
args = [] of String
|
||||||
(start..array.size + start - 1).each { |i| args << "($#{i})" }
|
(start..array.size + start - 1).each { |i| args << "($#{i})" }
|
||||||
args = args.join(",")
|
args = args.join(",")
|
||||||
|
end
|
||||||
|
|
||||||
return args
|
return args
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue