diff options
author | Conrad Irwin <conrad.irwin@gmail.com> | 2011-12-23 08:33:21 -0800 |
---|---|---|
committer | Conrad Irwin <conrad.irwin@gmail.com> | 2011-12-23 08:36:44 -0800 |
commit | ac2d6f1898a5aa1aad7cc254290ec9341d2cdf60 (patch) | |
tree | 9a7a912105879ad19b4012a4512aa7598d6bb15a /lib/coderay/encoders/html.rb | |
parent | 3d80f03434ba20544a410c13228738f4362d731b (diff) | |
download | coderay-ac2d6f1898a5aa1aad7cc254290ec9341d2cdf60.tar.gz |
Remove assumption about a stable $:
In some environments (e.g. [1]) $: can change between loading the
library and using it.
To avoid this problem, we always pass an absolute path to autoload
internal modules.
[1] https://github.com/pry/pry/issues/280
Diffstat (limited to 'lib/coderay/encoders/html.rb')
-rw-r--r-- | lib/coderay/encoders/html.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb index 60dfad1..c5d680c 100644 --- a/lib/coderay/encoders/html.rb +++ b/lib/coderay/encoders/html.rb @@ -109,9 +109,9 @@ module Encoders :hint => false, } - autoload :Output, 'coderay/encoders/html/output' - autoload :CSS, 'coderay/encoders/html/css' - autoload :Numbering, 'coderay/encoders/html/numbering' + autoload :Output, CodeRay.abs_path('coderay/encoders/html/output') + autoload :CSS, CodeRay.abs_path('coderay/encoders/html/css') + autoload :Numbering, CodeRay.abs_path('coderay/encoders/html/numbering') attr_reader :css |