Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rdoc 3.10 autoloads everything, so you _have_ to require 'rdoc' direc…

…tly. leave other requires for backwards compat
  • Loading branch information...
commit ecdf14893b40cc1bc21aaedca9578d36d264f89e 1 parent c2be509
@timfel timfel authored
View
6 TEMPLATES.md
@@ -407,9 +407,9 @@ library.
### Usage
-__NOTE:__ It's suggested that your program `require 'rdoc/markup'` and
-`require 'rdoc/markup/to_html'` at load time when using this template
-engine in a threaded environment.
+__NOTE:__ It's suggested that your program `require 'rdoc'`,
+`require 'rdoc/markup'`, and `require 'rdoc/markup/to_html'` at load time
+when using this template engine in a threaded environment.
### See also
View
7 lib/tilt/rdoc.rb
@@ -4,9 +4,9 @@ module Tilt
# RDoc template. See:
# http://rdoc.rubyforge.org/
#
- # It's suggested that your program require 'rdoc/markup' and
- # 'rdoc/markup/to_html' at load time when using this template
- # engine.
+ # It's suggested that your program `require 'rdoc/markup'` and
+ # `require 'rdoc/markup/to_html'` at load time when using this template
+ # engine in a threaded environment.
class RDocTemplate < Template
self.default_mime_type = 'text/html'
@@ -15,6 +15,7 @@ def self.engine_initialized?
end
def initialize_engine
+ require_template_library 'rdoc'
require_template_library 'rdoc/markup'
require_template_library 'rdoc/markup/to_html'
end
View
1  test/tilt_rdoctemplate_test.rb
@@ -2,6 +2,7 @@
require 'tilt'
begin
+ require 'rdoc'
require 'rdoc/markup'
require 'rdoc/markup/to_html'
class RDocTemplateTest < Test::Unit::TestCase
Please sign in to comment.
Something went wrong with that request. Please try again.