lib/masticate/base.rb in masticate-0.3 vs lib/masticate/base.rb in masticate-0.3.1

- old
+ new

@@ -23,11 +23,17 @@ result end def get line = @input.gets - @input_count += 1 - line && line.chomp + return nil if line.nil? + line.chomp! + if line.empty? + get + else + @input_count += 1 + line + end end def emit(line) @output_count ||= 0 @output_count += 1