From e8829198c956c7348e65833c53fb1a5c81c271a5 Mon Sep 17 00:00:00 2001 From: Mau Magnaguagno Date: Tue, 5 Mar 2024 12:08:50 -0300 Subject: [PATCH] Merge increment in HDDL_Parser parse_objects --- parsers/HDDL_Parser.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/parsers/HDDL_Parser.rb b/parsers/HDDL_Parser.rb index 808092d..9b2d5d2 100644 --- a/parsers/HDDL_Parser.rb +++ b/parsers/HDDL_Parser.rb @@ -60,10 +60,9 @@ def parse_objects(group) @objects.concat(o = group.shift(i)) group.shift types = [group.shift] - ti = 0 - while type = types[ti] + ti = -1 + while type = types[ti += 1] @types.each {|sub,t| types << t if sub == type and not types.include?(t)} - ti += 1 end types.each {|t| (@state[t] ||= []).concat(o.zip)} end