Skip to content

Commit 828f851

Browse files
committed
Improve frozen buffer error handling.
Previous line was actually debugging that shouldn't have been committed. This is much better.
1 parent 2dae2fd commit 828f851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/actions/file_manipulation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def capture(*args)
341341
end
342342

343343
def with_output_buffer(buf = "".dup) #:nodoc:
344-
raise "No: #{buf}" if buf.frozen?
344+
raise ArgumentError, "Buffer can not be a frozen object" if buf.frozen?
345345
old_buffer = output_buffer
346346
self.output_buffer = buf
347347
yield

0 commit comments

Comments
 (0)