summaryrefslogtreecommitdiff
path: root/lib/coderay/scanner.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2008-07-29 16:51:44 +0000
committermurphy <murphy@rubychan.de>2008-07-29 16:51:44 +0000
commitf01dd70e76c89025d09436a5157e71b283d03c37 (patch)
tree08b631075fd74d1dddbc474a842ce4f908f9a210 /lib/coderay/scanner.rb
parent13d7eac0b77f3ca280e12422104753d7651ab047 (diff)
downloadcoderay-f01dd70e76c89025d09436a5157e71b283d03c37.tar.gz
[KK] Just a little code cleanup and new task 187.
Diffstat (limited to 'lib/coderay/scanner.rb')
-rw-r--r--lib/coderay/scanner.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/coderay/scanner.rb b/lib/coderay/scanner.rb
index 6ea57eb..d33e2f2 100644
--- a/lib/coderay/scanner.rb
+++ b/lib/coderay/scanner.rb
@@ -66,7 +66,9 @@ module CodeRay
end
def normify code
- code = code.to_s.to_unix
+ code = code.to_s
+ code.force_encoding 'binary' if code.respond_to? :force_encoding
+ code.to_unix
end
def file_extension extension = nil