Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

let autoloading to the work (fix test warnings)

  • Loading branch information...
commit 964397d4bfbcbbd27d51e252faf25e291429e7d9 1 parent c8e21f2
@korny korny authored
Showing with 1 addition and 4 deletions.
  1. +1 −3 lib/coderay/scanners/diff.rb
  2. +0 −1  test/functional/examples.rb
View
4 lib/coderay/scanners/diff.rb
@@ -16,8 +16,6 @@ class Diff < Scanner
protected
- require 'coderay/helpers/file_type'
-
def scan_tokens encoder, options
line_kind = nil
@@ -50,7 +48,7 @@ def scan_tokens encoder, options
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
View
1  test/functional/examples.rb
@@ -97,7 +97,6 @@ def test_examples
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
Please sign in to comment.
Something went wrong with that request. Please try again.