Skip to content

Commit 964397d

Browse files
committed
let autoloading to the work (fix test warnings)
1 parent c8e21f2 commit 964397d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

lib/coderay/scanners/diff.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ class Diff < Scanner
1616

1717
protected
1818

19-
require 'coderay/helpers/file_type'
20-
2119
def scan_tokens encoder, options
2220

2321
line_kind = nil
@@ -50,7 +48,7 @@ def scan_tokens encoder, options
5048
if match = scan(/.*?(?=$|[\t\n\x00]| \(revision)/)
5149
encoder.text_token match, :filename
5250
if options[:highlight_code] && match != '/dev/null'
53-
file_type = FileType.fetch(match, :text)
51+
file_type = CodeRay::FileType.fetch(match, :text)
5452
file_type = :text if file_type == :diff
5553
content_scanner = scanners[file_type]
5654
content_scanner_entry_state = nil

test/functional/examples.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def test_examples
9797
DIV
9898

9999
# highlight a file (HTML div); guess the file type base on the extension
100-
require 'coderay/helpers/file_type'
101100
assert_equal :ruby, CodeRay::FileType[__FILE__]
102101

103102
# get a new scanner for Python

0 commit comments

Comments
 (0)