Граф коммитов

101 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 1b67c58f41 [ruby/rdoc] Pull up handle_tab_width to RDoc::Parser
To share with the duplicate code in RDoc::Parser::Ruby#initialize.

https://github.com/ruby/rdoc/commit/27829ac119
2022-11-27 16:35:07 +00:00
Nobuyoshi Nakada 131422ceea [ruby/rdoc] Support attributes defined by `rb_struct_define`
https://github.com/ruby/rdoc/commit/854b370763
2022-06-28 20:17:30 +09:00
Nobuyoshi Nakada 51be2cf6d2 [ruby/rdoc] Parse also InitVM-prefixed functions
Initialization depending on VM is separated.

https://github.com/ruby/rdoc/commit/030d10fccd
2022-06-28 14:51:49 +09:00
Nobuyoshi Nakada 082c2d1b05 [ruby/rdoc] [DOC] Undocument internal constants [ci skip]
https://github.com/ruby/rdoc/commit/6d7bf24bb8
2022-06-07 11:44:58 +09:00
Nobuyoshi Nakada dbfb3b1917 [ruby/rdoc] Allow boolean arguments to `rb_attr` and `rb_define_attr`
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
2022-06-07 10:42:10 +09:00
Nobuyoshi Nakada ebcbca96fb [ruby/rdoc] Fix full name of known class
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
2022-03-16 15:05:41 +09:00
Nobuyoshi Nakada ec6d1cf28f [ruby/rdoc] Get rid of ruby-mode.el confusions
https://github.com/ruby/rdoc/commit/63fac51198
2022-02-09 22:22:45 +09:00
Soutaro Matsumoto cbd54cba03 [ruby/rdoc] Skip parentheses on singleton class declaration
https://github.com/ruby/rdoc/commit/b6c6d4f978
2022-02-09 18:45:05 +09:00
Nobuyoshi Nakada dec96dd897 [ruby/rdoc] Support all struct definition functions
Currently only `rb_struct_define_without_accessor` is supported by
https://github.com/ruby/rdoc/pull/73.  We should support other
three functions too.

https://github.com/ruby/rdoc/commit/d42288f06c
2022-02-09 18:43:07 +09:00
Mike Dalessio 7aec65add4 [ruby/rdoc] feat: add support for :category: on C functions
https://github.com/ruby/rdoc/commit/45c92005fe
2021-10-16 01:39:36 +09:00
Mike Dalessio fbd0516afc [ruby/rdoc] fix: comments in C files use the global markup option
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
2021-10-16 01:39:06 +09:00
Mike Dalessio d4894e81c0 [ruby/rdoc] extract Comment creation in Parser::C
This is a prefactor for fixing comment format handling.

https://github.com/ruby/rdoc/commit/a3d366feed
2021-10-16 01:39:05 +09:00
aycabta caa123b50e [ruby/rdoc] Support ActiveSupport::Concern.included
ref. 168ddaa08a/activerecord/lib/active_record/core.rb (L9-L20)

https://github.com/ruby/rdoc/commit/a2d651dade

Co-authored-by: Fumiaki MATSUSHIMA <mtsmfm@gmail.com>
2021-07-05 11:34:29 +09:00
Nobuyoshi Nakada 19e6d27126 [ruby/rdoc] Support iso-strict format in git-log
https://github.com/ruby/rdoc/commit/2a6c22da63
2021-01-25 18:33:33 +09:00
Nobuyoshi Nakada 7fe22152fc [ruby/rdoc] Support other date formats in git-log
https://github.com/ruby/rdoc/commit/ad8cf37d72
2021-01-25 18:33:31 +09:00
Nobuyoshi Nakada 52ebaf718e [ruby/rdoc] Skip non-date logs by git-log
`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
2021-01-24 16:46:27 +09:00
Nobuyoshi Nakada d5d1c41728 [ruby/rdoc] Sort by CommitDate if available
https://github.com/ruby/rdoc/commit/455715e930
2021-01-24 16:46:25 +09:00
Nobuyoshi Nakada fa048a0f85 [ruby/rdoc] Add links to the commits
https://github.com/ruby/rdoc/commit/1821628076
2021-01-24 16:46:23 +09:00
Nobuyoshi Nakada f3f1a666c7 [ruby/rdoc] Shorten commit hashes
https://github.com/ruby/rdoc/commit/5d3e153963
2021-01-24 16:46:21 +09:00
Nobuyoshi Nakada 127f735c1e [ruby/rdoc] Tweak log entry markdown
* add 3 levels to headings
* prefix commit log to labels to make unique IDs

https://github.com/ruby/rdoc/commit/5074c13209
2021-01-24 16:46:19 +09:00
Nobuyoshi Nakada b88d1e6b44 [ruby/rdoc] Make each commit entries h3
https://github.com/ruby/rdoc/commit/11eefb2ae9
2021-01-24 16:46:17 +09:00
Nobuyoshi Nakada bb570ce6d8 [ruby/rdoc] Support ChangeLog generated by `git log`
https://github.com/ruby/rdoc/commit/5e0a123ca1
2021-01-24 16:46:15 +09:00
Nobuyoshi Nakada 288e93bea8
Exclude parenthesized function declarations such as NORETURN
Fixes https://github.com/ruby/ruby/pull/3883
2020-12-11 13:43:18 +09:00
Jeremy Evans 38480ad507 [ruby/rdoc] Fix parsing of rb_define_module_under
Fixes Ruby Bug #15819

https://github.com/ruby/rdoc/commit/94a052d833
2020-07-22 02:34:49 +09:00
Jeremy Evans 7e7981c84f [ruby/rdoc] Treat multiple Ruby methods calling the same C method as aliases
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
2020-05-24 23:47:24 +09:00
aycabta adc9b3ca7f [ruby/rdoc] Support newline in the middle of constant definition
https://github.com/ruby/rdoc/commit/74d3984324
2019-12-24 07:58:53 +09:00
aycabta e50e552693 [ruby/rdoc] Treat Proc#call syntax sugar for constant correctly
https://github.com/ruby/rdoc/commit/957d041ae0
2019-12-24 07:58:53 +09:00
aycabta 2d0a1a1869 Fix ghost method line no 2019-11-28 08:19:05 +09:00
Yusuke Endoh cd41378ef9 lib/rdoc/parser/ruby.rb: Avoid `.chars.to_a.last`
The code creates a lot of useless objects.
Instead, using a regexp is shorter and faster.
2019-08-16 11:36:47 +09:00
Yusuke Endoh f71bd7477e RDoc::Parser::C: Integrate do_classes and do_modules by one regexp match
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
2019-08-16 06:07:11 +09:00
aycabta a86d4eef4b [ruby/rdoc] Normalization of comment should check language
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
2019-07-26 17:20:58 +08:00
Nobuyoshi Nakada 6566919176
ripper_state_lex.rb: chomp CR
* lib/rdoc/parser/ripper_state_lex.rb (RDoc::Parser::RipperStateLex):
  chomp newline, including CR, from here document terminator.

Closes: ruby/rdoc#694
Closes: ruby/rdoc#697
Closes: ruby/rdoc#705
2019-06-07 18:57:58 +09:00
nobu fa04b87af4 [DOC] fix missing paren [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-28 08:39:24 +00:00
nobu 79aef1272e [DOC] escape descriptions [ci skip]
Escape descriptions not to get parsed as directives.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:49:32 +00:00
nobu 9035e73a14 [DOC] mark function names [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:41:13 +00:00
nobu 8513c20370 [DOC] split a tag for each function name [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:25:32 +00:00
kazu 44aaff6d31 [DOC] Fix close tags [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:10:10 +00:00
nobu 8586f021f8 rdoc/parser/c.rb: ignore dynamically added methods
* 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
2018-10-28 01:56:28 +00:00
aycabta 1b43644edc Merge rdoc-6.1.0.beta2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-17 06:28:20 +00:00
hsbt 95e213d354 Merge rdoc-6.1.0.beta1.
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 01:30:18 +00:00
hsbt e75d8e0c65 Merge rdoc-6.0.4 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-08 02:07:53 +00:00
hsbt 98c7058bf7 Merge RDoc 6.0.3 from upstream.
It fixed the several bugs that was found after RDoc 6 releasing.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-26 05:56:26 +00:00
hsbt 9fe26ef8de Merge rdoc-6.0.1.
It fixes an installation error of activerecord.

  https://github.com/ruby/rdoc/issues/571

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 23:33:09 +00:00
hsbt 5551871086 Merge rdoc-6.0.0.beta4 from upstream.
It version applied `frozen_string_literal: true`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 10:45:24 +00:00
hsbt db6c51ec4f Merge rdoc-6.0.0.beta3.
* It version introduced did you mean? feature for ri command:
    https://github.com/ruby/rdoc/pull/533
  * Removed obbsoleted ruby_token.rbb.
    [Bug #13990][ruby-core:83180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-10 02:01:00 +00:00
ko1 9ea2102e57 remove an unused variable (sometimes it fails test).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 01:55:59 +00:00
hsbt 214a7f8d49 Merge rdoc-6.0.0.beta2 from upstream.
* This version changed lexer used Ripper from lexer based IRB.
    see details: https://github.com/ruby/rdoc/pull/512

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12 03:42:54 +00:00
hsbt 4790c08906 Merge rdoc-6.0.0.beta1.
This version fixed strange behavior of ruby code parser.
  We will list all of impromovement to Changelog when 6.0.0 releasing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-29 11:52:50 +00:00
hsbt df3e22ce84 Update rdoc-5.1.0
* Details of changes are following url.
    https://github.com/rdoc/rdoc/blob/master/History.rdoc#510--2017-02-24

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24 07:39:37 +00:00
hsbt ba6ae341ba * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2
Fixed ri parse defect with left-hand matched classes.
  https://github.com/rdoc/rdoc/pull/420

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07 22:23:38 +00:00