$type in the loop is not null, so move $type location to gain normal value
Signed-off-by: Zhou Shengruizhoushengrui1@huawei.com --- stats/crystal/test-bpf.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stats/crystal/test-bpf.cr b/stats/crystal/test-bpf.cr index 3941a110..6f11e0ae 100644 --- a/stats/crystal/test-bpf.cr +++ b/stats/crystal/test-bpf.cr @@ -8,6 +8,7 @@ stats = [] of String success_test = 0 fail_test = 0 is_divided = false +type = ""
while (line = STDIN.gets) case line @@ -39,7 +40,6 @@ while (line = STDIN.gets) success_test = $1 fail_test = $2 when /(PASS|FAIL)/ - type = "" if is_divided stats << type + ".#{$1.downcase}: 1" is_divided = false