lib/rgot/example_parser.rb in rgot-1.1.0 vs lib/rgot/example_parser.rb in rgot-1.2.0

- old
+ new

@@ -1,15 +1,17 @@ +# frozen_string_literal: true + require 'ripper' module Rgot class ExampleParser < Ripper attr_accessor :examples def initialize(code) super @examples = [] @in_def = false @has_output = false - @output = "" + @output = "".dup end def on_def(method, args, body) @examples << ExampleOutput.new(method.to_sym, @output.dup) @output.clear