lib/cucumber/formatter/interceptor.rb in cucumber-4.1.0 vs lib/cucumber/formatter/interceptor.rb in cucumber-5.0.0

- old
+ new

@@ -3,10 +3,11 @@ module Cucumber module Formatter module Interceptor class Pipe attr_reader :pipe + def initialize(pipe) @pipe = pipe @buffer = StringIO.new @wrapped = true @lock = Mutex.new @@ -29,10 +30,10 @@ @wrapped = false @pipe end def method_missing(method, *args, &blk) - @pipe.send(method, *args, &blk) || super + @pipe.respond_to?(method) ? @pipe.send(method, *args, &blk) : super end def respond_to_missing?(method, include_private = false) super || @pipe.respond_to?(method, include_private) end