lib/x12/base.rb in gm_x12-1.6.1 vs lib/x12/base.rb in gm_x12-1.6.2
- old
+ new
@@ -82,13 +82,11 @@
possible_repeat = current_element.dup
repeat_count+=1
p_s = possible_repeat.parse_helper(s, yield_loop_name, block)
if p_s
s = p_s
- if yield_loop_name && yield_loop_name == name
- block.call(possible_repeat)
- else
+ unless yield_loop_name && yield_loop_name == name
current_element.next_repeat = possible_repeat
end
current_element = possible_repeat
else
break
@@ -103,9 +101,10 @@
s
end
# Empty out the current element
def set_empty!
+ @fields = nil
@next_repeat = nil
@parsed_str = nil
self
end