Commits

Kaspar Schiess  committed 8f2c1c8

Fixes a bug where unwinding of tree didn't work

  • Participants
  • Parent commits 8e639b2

Comments (0)

Files changed (2)

File lib/iscsi/hash_parser.rb

           
           # One level up: 
           if last && indent < last.indent
-            insertion_point = insertion_point.parent
+            insertion_point = insertion_point.parent \
+              while insertion_point.indent >= indent
+
             fail "Assertion failed: Popped beyond root node." unless insertion_point
           end
           

File spec/lib/iscsi/hash_parser_spec.rb

     Alias             : -
     Protocol          : iSCSI
     Sessions          : 0
+        Initiator: iqn.1986-03.com.sun:01:40f581320dff.506ef076
+            Alias: machine1
+            Logged in since: Wed Dec 12 18:59:12 2012
 Target: iqn.2010-08.org.illumos:02:6140505e-fb64-6670-b412321321312121
     Operational Status: Online
     Provider Name     : iscsit