rdoc version 4.0.0.preview2 has been released!
- home: https://github.com/rdoc/rdoc
- rdoc: http://docs.seattlerb.org/rdoc
- bugs: https://github.com/rdoc/rdoc/issues
RDoc produces HTML and command-line documentation for Ruby projects.
includes the +rdoc+ and +ri+ tools for generating and displaying
from the command-line.
As a preview release, please file bugs for any problems you have with
RDoc 4.0 includes several new features and several breaking changes.
changes should not affect users of
Notable feature additions are markdown support and an WEBrick servlet
serve HTML from an ri store. (This means that RubyGems 2.0+ no longer
to build HTML documentation when installing gems.)
- Breaking changes
The default output encoding for RDoc is now UTF-8. Previously RDoc
the default external encoding which was determined from your locale.
Issue #106 by Justin Baker.
RDoc::RI::Store is now RDoc::Store so ri data generated by RDoc 4
be read by earlier versions of RDoc. RDoc::RI::Store exists as an
of RDoc::Store so ri data from older versions can still be read.
RDoc::RI::Store will be removed in RDoc 5.
Tests that create RDoc::CodeObjects on the fly without wiring them
the documentation tree (did not use add_class, add_method, etc.)
updated to use these methods. The documentation tree automatically
attaches them to the store instance which allows lookups to work
correctly. Additionally, a new method RDoc::Store#add_file must be
instead of RDoc::TopLevel.new. The latter will not be attached to
RDoc generators must accept an RDoc::Store and an RDoc::Options in
initialize. RDoc no longer passes an Array of RDoc::TopLevel
#generate. Use RDoc::Store#all_files instead.
Some markup formatters (RDoc::Markup::To*) now accept an
instance as the first argument. Notably, the base class Formatter
ToHtml*. (This is not universal due to the difficult at accessing
user’s options instance deep inside RDoc. A future major release
Added new markup nodes and specials that RDoc::Markup::Formatter
subclasses must handle. If you’re using
the new methods you need to add should be readily apparent.
Removed RDoc::RI::Paths::SYSDIR and ::SITEDIR. These were hidden
constants so no breakage is expected. Use
and ::site_dir instead.
RDoc::RI::Store#modules has been renamed to RDoc::Store#module_names
to avoid confusion with RDoc::Store#all_modules imported from
RDoc::RDocError has been removed. It was deprecated throughout RDoc
ri -f html is no longer supported.
Comment definitions in C comments are now only discovered from the
line. A colon on a subsequent line won’t trigger definition
Issue #103, see also
Fixed :stopdoc: for class A::B where A has not been seen. Issue #95
RDoc::ClassModule#each_ancestor no longer yields itself if there is
ri can now show pages (README, etc.)
Will show the README for the latest version of RDoc. You can
exact gem versions such as “rdoc-4.0:README” or view pages from the
standard library documentation with “ruby:README”.
RDoc 3 did not save pages in ri data so you will need to regenerate
documentation from your gems to use this feature.
Added Markdown as a supported format. The markdown format can be
set on a
per-file or per-comment basis with the +:markdown:+ directive like
and tomdoc formats and on a per-project basis with
rdoc --markup markdown --write-options
Removed global state from RDoc. RDoc::Store holds the documentation
and connects the driver to the parsers and generator. This also
documentation parsing and generation for multiple instances, but the
command-line tool does not support this.
Due to this change RDoc::RDoc.current and RDoc::RDoc.reset no longer
- Added --root for building documentation from outside the source dir.
- Added a table of contents to the sidebar.
- RDoc markup format merges adjacent labels in a label or note list
single definition list item for output.
- RDoc now tracks use of extend. Pull request #118 by Michael
- RDoc now tracks methods that use super. Pull request #116 by Erik
- Added methods ::system_dir, ::site_dir, ::home_dir and ::gem_dir to
the components of RDoc::RI::Paths.path individually.
- Added support for rb_file_const.
- RDoc now processes files in sorted order. Issue #71 by Vt Ondruch
- RDoc now warns with --verbose when methods are duplicated. Issue
- ri will display documentation for all methods in a class if -a is
Issue #57 by casper
- The RDoc coverage report will report line information for
constants and methods missing documentation. Issue #121 by Zachary
- RDoc now reports a warning for files that are unreadable due to
- RDoc controls documentation generation for RubyGems 2.0+
- A word that is directly followed by a multi-word tidy link label no
- Fixed legacy template support. Pull Request #107 by Justin Baker.
- An HTML class in a verbatim section no longer triggers ruby parsing.
Issue #92 by Vijay D.
- Improved documentation for setting the default documentation format
your ruby project. Issue #94 by Henrik H.
- Fixed handling of LANG in the RDoc::Options tests. Issue #99 by Vt
- RDoc no longer quits when given an entry that is not a file or
Issue #101 by Charles Nutter
- Fixed bug in syntax-highlighting that would corrupt regular
Ruby Bug #6488 by Benny Lyne Amorsen.
- “class Object” no longer appears in the coverage report if all its
are documented. This suppresses a false positive for libraries that
toplevel methods. Pull Request #128 by Zachary S…
- Fixed test_gen_url test name in TestRDocMarkupToHtml. Pull Request
by Zachary S…
- Comment-defined methods ahead of define_method are now discovered.
#133 by eclectic923
- Fixed detection of define_method documentation. Issue #138 by
- Fixed lexing of character syntax (
?z). Reported by
- Add license to gem spec. Issue #144 by pivotalcommon
- Fixed comment selection for classes. Pull request #146 by pioz
- Fixed parsing of
def self.&() end. Issue #148 by
- Generated RD parser files are now included in the gem. Issue #145
- Class and module aliases now create new classes to avoid duplicate
in the class list. Issue #143 by Richard S., Rails Issue
- RDoc::Markup::Parser now correctly matches indentation of lists when
multibyte characters are used in the list labels. Issue #140 by
- Fixed mangling of email addresses that look like labels. Issue #129
- Classes and modules in a C file may now be created in any order.
#124 by Su Zhang
- A metaprogrammed method supports the :args: directive. Issue #100
- A metaprogrammed method supports the :yields: directive.
- RDoc will now look for directives up to the end of the line. For
class B < A; end # :nodoc:
will now hide documentation of B. Issue #125 by Zachary S.
- Fixed tokenization of % when it is not followed by a $-string type
- Fixed display of END in documentation examples in HTML output
- Fixed tokenization of reserved words used as new-style hash keys
- RDoc now handles class << $gvar by ignoring the body
- Fixed parsing of class A:: B.
- Worked around bug in RDoc::RubyLex where tokens won’t be
- Fixed class << ::Foo writing documentation to /Foo.html
- Fixed class ::A referencing itself from inside its own namespace.
- A word that is directly followed by a multi-word tidy link label no