From 828f851d9c925bbe4c05f28f8557f20d517d501c Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Tue, 18 Jul 2017 18:51:06 +1000 Subject: [PATCH] Improve frozen buffer error handling. Previous line was actually debugging that shouldn't have been committed. This is much better. --- lib/thor/actions/file_manipulation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/thor/actions/file_manipulation.rb b/lib/thor/actions/file_manipulation.rb index c8287531e..48acada1b 100644 --- a/lib/thor/actions/file_manipulation.rb +++ b/lib/thor/actions/file_manipulation.rb @@ -341,7 +341,7 @@ def capture(*args) end def with_output_buffer(buf = "".dup) #:nodoc: - raise "No: #{buf}" if buf.frozen? + raise ArgumentError, "Buffer can not be a frozen object" if buf.frozen? old_buffer = output_buffer self.output_buffer = buf yield