diff options
author | murphy <murphy@rubychan.de> | 2010-06-29 07:11:21 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-06-29 07:11:21 +0000 |
commit | a1330de9438827abcdc331c85dbd7e358b0e118a (patch) | |
tree | 7f3fa69a87b529f815525e0a24e85504907d5753 /lib/coderay/scanner.rb | |
parent | 13a98cec5c7f19e8e7231899645b8f51464becb4 (diff) | |
download | coderay-a1330de9438827abcdc331c85dbd7e358b0e118a.tar.gz |
Use autoload instead of require (speeds up CodeRay startup) for CodeRay, Scanner, Tokens, and Encoders::HTML.
Diffstat (limited to 'lib/coderay/scanner.rb')
-rw-r--r-- | lib/coderay/scanner.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/coderay/scanner.rb b/lib/coderay/scanner.rb index cc1f665..beff642 100644 --- a/lib/coderay/scanner.rb +++ b/lib/coderay/scanner.rb @@ -1,7 +1,9 @@ module CodeRay - require 'coderay/helpers/plugin' - + autoload :WordList, 'coderay/helpers/word_list' + # FIXME: Rename CaseIgnoringWordList to WordList::CaseIgnoring. + autoload :CaseIgnoringWordList, 'coderay/helpers/word_list' + # = Scanners # # This module holds the Scanner class and its subclasses. @@ -50,8 +52,6 @@ module CodeRay # Raised if a Scanner fails while scanning ScanError = Class.new(Exception) - require 'coderay/helpers/word_list' - # The default options for all scanner classes. # # Define @default_options for subclasses. |