Permalink
Browse files

rtags is barfing on binary file (png) in my rails project, ruby 1.9

needs to open files as binary as it assumes all external data is text
unless told otherwise
  • Loading branch information...
fkchang committed Dec 1, 2011
1 parent 63fdbc2 commit 33f0ce3300da33f734ecc17681c90483e4a48490
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/rtags
View
@@ -607,7 +607,7 @@ module RTAGS
return false
end
# OK - test for magic hash bang
- firstline = File.new(name).gets
+ firstline = File.new(name, :encoding => "BINARY").gets
return false if firstline =~ /^#\!/ and firstline =~ /ruby/i
true
end

0 comments on commit 33f0ce3

Please sign in to comment.