about summary refs log tree commit diff
path: root/notyet
diff options
context:
space:
mode:
Diffstat (limited to 'notyet')
-rwxr-xr-xnotyet13
1 files changed, 8 insertions, 5 deletions
diff --git a/notyet b/notyet
index 62a72d4..925722d 100755
--- a/notyet
+++ b/notyet
@@ -90,10 +90,14 @@ class Entry < Struct.new(:depth, :state, :desc, :file, :line, :children)
     self.children = children.map { |c|
       c.splat
 
-      if c.desc == "#splat" && !c.children.empty?
-        sub = c.children.map { |cc| cc.children }.flatten
-        rel = sub.first.depth - c.depth
-        sub.map { |cc| cc.reindent(-rel) }
+      if c.desc == "#splat"
+        if c.children.empty?
+          []
+        else
+          sub = c.children.map { |cc| cc.children }.flatten
+          rel = sub.first.depth - c.depth
+          sub.map { |cc| cc.reindent(-rel) }
+        end
       else
         [c]
       end
@@ -143,7 +147,6 @@ def parse(io, filename=nil)
       children = []
 
       if desc =~ /^#exec\s+(.+)/
-# - error handling for #exec
         Dir.chdir(File.dirname(fname)) {
           begin
             IO.popen($1) { |f|