From 0cc6a781456a27c1578dffc1ff1abeb1524287b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Rasmusson?= Date: Sat, 20 Jan 2018 20:28:24 +0100 Subject: [PATCH] Add deprecation warning for Interceptor::Pipe#buffer. --- lib/cucumber/formatter/interceptor.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cucumber/formatter/interceptor.rb b/lib/cucumber/formatter/interceptor.rb index 694ca08a75..ae3f3678f1 100644 --- a/lib/cucumber/formatter/interceptor.rb +++ b/lib/cucumber/formatter/interceptor.rb @@ -21,6 +21,11 @@ def write(str) # @deprecated use #buffer_string def buffer + require 'cucumber/deprecate.rb' + Cucumber.deprecate( + 'Use Cucumber::Formatter::Interceptor::Pipe#buffer_string instead', + 'Cucumber::Formatter::Interceptor::Pipe#buffer', + '3.99') lock.synchronize do return @buffer.string.lines end