]> git.openstreetmap.org Git - rails.git/blobdiff - lib/diff_reader.rb
Test and fix for issue #1568. Wasn't testing for end element in the right place.
[rails.git] / lib / diff_reader.rb
index 3b13e94626cc301f941a103a8df812a1b7fc831a..452d73dab1696c48ea7db6c00f85d943ac473371 100644 (file)
@@ -47,7 +47,7 @@ class DiffReader
       # read the first element
       read_or_die
 
       # read the first element
       read_or_die
 
-      begin
+      while @reader.node_type != 15 do # end element
         # because we read elements in DOM-style to reuse their DOM
         # parsing code, we don't always read an element on each pass
         # as the call to @reader.next in the innermost loop will take
         # because we read elements in DOM-style to reuse their DOM
         # parsing code, we don't always read an element on each pass
         # as the call to @reader.next in the innermost loop will take
@@ -57,7 +57,7 @@ class DiffReader
         else
           read_or_die
         end
         else
           read_or_die
         end
-      end while @reader.node_type != 15 # end element
+      end 
     end
     read_or_die
   end
     end
     read_or_die
   end