Skip to content

Commit

Permalink
Improve frozen buffer error handling.
Browse files Browse the repository at this point in the history
Previous line was actually debugging that shouldn't have been committed. This is much better.
  • Loading branch information
pat committed Jul 18, 2017
1 parent 2dae2fd commit 828f851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thor/actions/file_manipulation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 828f851

Please sign in to comment.