Previously only unknown word `intern` is allowed between a single-word
token before a C method. Now any single-word token, such as `inline`
which is used for `ArithmeticSequence` in enumerator.c, is allowed
instead.
https://github.com/ruby/rdoc/commit/3a214c1dd1
Currently only literal `0` and `1` are accepted as `read`/`write`
flags.
This patch allows other boolean arguments, C macros (`FALSE`/`TRUE`),
Ruby `VALUE`s (`Qfalse`/`Qtrue`), and C99 `bool`s (`false`/`true`), as
well.
https://github.com/ruby/rdoc/commit/169dc02e3c
Properly set the name of `File::Constants`, which is the only name
with a namespace in `RDoc::KNOWN_CLASSES`, and fixes longstanding bug
that `File::Constants` becomes `File::File::Constants`.
When it is generated by `rb_file_const` in dir.c, `name` is set to the
qualified name as same as `full_name`, and generated in the normal way
in file.c later, already set `full_name` is cleared and `name` will be
constructed from the enclosing namespace and the `name`. It will
results in duplicated namespace, `File::File::Constants`.
https://github.com/ruby/rdoc/commit/3a8d6df562
Previously, Parser::C comments all defaulted to "rdoc" format, even
when the user had set a different default with the `--markup=<choice>`
option.
https://github.com/ruby/rdoc/commit/4643b08a26
`RDoc::Parser::ChangeLog` mis-parses ChangeLog generated by
git-log, because of too heuristic `Time.parse`.
For instance, "commit 8187228de0142d3ac7950b7d977c2849e934c637"
results in "8187-08-16", that is, day 228 in the year 8187.
https://github.com/ruby/rdoc/commit/9711e6f6d9
Previously, only calls to rb_define_alias were treated as aliases.
This treats calls to rb_define_method with the same C function as
aliases, with the first function defined being the primary method.
This move the dedup code from the C parser to AnyMethod, and has
AnyMethod look in its aliases to find the call_seq.
Switch the deduplication code to remove lines matching one of the
other aliases, instead of only keeping lines matching the current
alias. The previous approach could eliminate all call_seq lines
in cases where no line matched. This was necessary to pass
tests when call_seq does deduplication by default.
The only change to the darkfish template is to not perform
unnecessary work by deduplicating twice.
https://github.com/ruby/rdoc/commit/0ead78616b
The full scan of the C source code (`@content.scan`) is very slow.
The old code invokes the scan six times in `do_classes` and
`do_modules`.
This change integrates the six scans into one by merging the regexps.
The integrated regexp is a bit hard to maintain, but the speed up is
significant: approx. 30 sec -> 20 sec in Ruby's `make rdoc`.
In addition, this change omits `do_boot_defclass` unless the file name
is `class.c`. `boot_defclass` is too specific to Ruby's source code, so
RDoc should handle it as a special case.
Before this change:
TOTAL (pct) SAMPLES (pct) FRAME
858 (13.6%) 858 (13.6%) (garbage collection)
292 (4.6%) 264 (4.2%) RDoc::Parser::C#do_define_class
263 (4.2%) 250 (3.9%) RDoc::Parser::C#do_define_module
275 (4.3%) 241 (3.8%) RDoc::Parser::C#do_define_class_under
248 (3.9%) 237 (3.7%) RDoc::Parser::C#do_define_module_under
234 (3.7%) 234 (3.7%) RDoc::Parser::C#gen_body_table
219 (3.5%) 219 (3.5%) Ripper::Lexer#state_obj
217 (3.4%) 216 (3.4%) RDoc::Parser::C#do_struct_define_without_accessor
205 (3.2%) 205 (3.2%) RDoc::Parser::C#do_boot_defclass
205 (3.2%) 205 (3.2%) RDoc::Parser::C#do_singleton_class
The six methods take approx. 22.2%.
`do_define_class` (4.2%) + `do_define_class_under` (3.8%) +
`do_define_module` (3,9$) + `do_define_module_under` (3.7%) +
`do_struct_define_without_accessor` (3.4%) + `do_singleton_class` (3.2%)
After this change, the methods are integrated to `do_classes_and_modules`
which takes only 5.8%.
TOTAL (pct) SAMPLES (pct) FRAME
812 (16.7%) 812 (16.7%) (garbage collection)
355 (7.3%) 284 (5.8%) RDoc::Parser::C#do_classes_and_modules
225 (4.6%) 225 (4.6%) RDoc::Parser::C#gen_body_table
429 (8.8%) 210 (4.3%) RDoc::Parser::RubyTools#get_tk
208 (4.3%) 208 (4.3%) RDoc::TokenStream#add_tokens
RDoc::Text#normalize_comment that is included RDoc::Comment always
remove Ruby style comment indicator "#" and C style comment indicator
"/**/", but should check language and remove only the language's comment
indicator.
https://github.com/ruby/rdoc/commit/ca68ba1e73
* lib/rdoc/parser/ripper_state_lex.rb (RDoc::Parser::RipperStateLex):
chomp newline, including CR, from here document terminator.
Closes: ruby/rdoc#694Closes: ruby/rdoc#697Closes: ruby/rdoc#705
* lib/rdoc/parser/c.rb (RDoc::Parser::C#deduplicate_call_seq):
skip dynamically added methods at runtime, because the class
name is unknown and the defined methods are not accessible from
that class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e