diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2011-12-27 02:45:32 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2011-12-27 02:45:32 +0100 |
commit | 964397d4bfbcbbd27d51e252faf25e291429e7d9 (patch) | |
tree | 794be4a7e15f413a0812cdc3de69a871d048eebe | |
parent | c8e21f2e6c83fffcb18e4e1b130bf4b3cf6b50de (diff) | |
download | coderay-964397d4bfbcbbd27d51e252faf25e291429e7d9.tar.gz |
let autoloading to the work (fix test warnings)
-rw-r--r-- | lib/coderay/scanners/diff.rb | 4 | ||||
-rwxr-xr-x | test/functional/examples.rb | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb index 52e23d5..9e899c3 100644 --- a/lib/coderay/scanners/diff.rb +++ b/lib/coderay/scanners/diff.rb @@ -16,8 +16,6 @@ module Scanners protected - require 'coderay/helpers/file_type' - def scan_tokens encoder, options line_kind = nil @@ -50,7 +48,7 @@ module Scanners if match = scan(/.*?(?=$|[\t\n\x00]| \(revision)/) encoder.text_token match, :filename if options[:highlight_code] && match != '/dev/null' - file_type = FileType.fetch(match, :text) + file_type = CodeRay::FileType.fetch(match, :text) file_type = :text if file_type == :diff content_scanner = scanners[file_type] content_scanner_entry_state = nil diff --git a/test/functional/examples.rb b/test/functional/examples.rb index 8540ac9..ff64af3 100755 --- a/test/functional/examples.rb +++ b/test/functional/examples.rb @@ -97,7 +97,6 @@ Token Types (7): DIV # highlight a file (HTML div); guess the file type base on the extension - require 'coderay/helpers/file_type' assert_equal :ruby, CodeRay::FileType[__FILE__] # get a new scanner for Python |