diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-06-23 13:29:01 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-06-23 13:29:01 +0200 |
commit | 1d445c70edf8d5c878f9a830dcd29f5a3e179923 (patch) | |
tree | 75ad0b7db37981acd3bf54984353e70229e351ad /bin/coderay | |
parent | d9d6dd5f4a73363ea5d353ecda142f77ed4eba5a (diff) | |
parent | 1e330f16c21c45eff375ba3b12f966c76ba0b393 (diff) | |
download | coderay-1d445c70edf8d5c878f9a830dcd29f5a3e179923.tar.gz |
Merge branch 'master' into upstream
Diffstat (limited to 'bin/coderay')
-rwxr-xr-x | bin/coderay | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/coderay b/bin/coderay index d78cd57..889ae72 100755 --- a/bin/coderay +++ b/bin/coderay @@ -125,7 +125,7 @@ when 'highlight', nil end if output_file - output_format ||= CodeRay::FileType[output_file] + output_format ||= CodeRay::FileType[output_file] || :plain else output_format ||= :terminal end @@ -143,7 +143,6 @@ when 'highlight', nil if output_file File.open output_file, 'w' else - $stdout.sync = true $stdout end CodeRay.encode(input, input_lang, output_format, :out => file) @@ -156,8 +155,9 @@ when 'highlight', nil puts boom.message end # puts "I don't know this plugin: #{boom.message[/Could not load plugin (.*?): /, 1]}." - rescue CodeRay::Scanners::Scanner::ScanError # FIXME: rescue Errno::EPIPE - # this is sometimes raised by pagers; ignore [TODO: wtf?] + rescue CodeRay::Scanners::Scanner::ScanError + # this is sometimes raised by pagers; ignore + # FIXME: rescue Errno::EPIPE ensure file.close if output_file end |