Skip to content

Commit cec235c

Browse files
committed
don't close stdout
1 parent b7a6089 commit cec235c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/coderay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ when 'highlight', nil
159159
rescue CodeRay::Scanners::Scanner::ScanError # FIXME: rescue Errno::EPIPE
160160
# this is sometimes raised by pagers; ignore [TODO: wtf?]
161161
ensure
162-
file.close
162+
file.close if output_file
163163
end
164164
end
165165
when 'li', 'list'

0 commit comments

Comments
 (0)