739 Commits
Author SHA1 Message Date
Hiroshi SHIBATA eb7cb164cf CVE-2024-27281 for Ruby 3.3 (#10316)
Merge RDoc-6.6.3.1
2024-03-21 07:12:38 +00:00
Hiroshi SHIBATA 6c7c4ac407 [ruby/rdoc] Bump up v6.6.2
https://github.com/ruby/rdoc/commit/895f1affc0
2023-12-16 11:42:30 +08:00
Nobuyoshi Nakada 20f4f00764 [ruby/rdoc] [DOC] nodoc for probably internal methods
https://github.com/ruby/rdoc/commit/f7dd147a8c
2023-12-16 00:26:39 +09:00
Nobuyoshi Nakada e15d690db1 [ruby/rdoc] [DOC] Add missing documents
https://github.com/ruby/rdoc/commit/e4c90340d0
2023-12-16 00:26:37 +09:00
Nobuyoshi Nakada b257181ccc [ruby/rdoc] Remove unused method RDoc::Encoding.remove_frozen_string_literal
https://github.com/ruby/rdoc/commit/7a8e9a97fa
2023-12-16 00:25:51 +09:00
Nobuyoshi Nakada e03e872eea [ruby/rdoc] Only word-ending colon separates new definition
When followed by non-space characters, rather it looks like a URL or a
path name on Windows.

https://github.com/ruby/rdoc/commit/72c6560773
2023-12-06 09:35:44 +00:00
Nobuyoshi Nakada 379f06797d [ruby/rdoc] Needs more backslash to match escaping backslashs
https://github.com/ruby/rdoc/commit/1904e9076d
2023-12-06 09:35:43 +00:00
Nobuyoshi Nakada 113f5d7fd7 [ruby/rdoc] Allow any single-word token upto 2 before C method implementation
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
2023-12-05 08:48:19 +00:00
Nobuyoshi Nakada c0baa3783f [ruby/rdoc] Reduce matched substring allocations
https://github.com/ruby/rdoc/commit/aaed688a97
2023-12-05 08:48:18 +00:00
Hiroshi SHIBATA d691b1a141 [ruby/rdoc] Bump up 6.6.1
https://github.com/ruby/rdoc/commit/7cf353a696
2023-12-05 07:37:08 +00:00
ToshimaruandNobuyoshi Nakada 56ccad060d [ruby/rdoc] Early return when token_stream is nil
https://github.com/ruby/rdoc/commit/04f75d8516

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-05 06:21:52 +00:00
toshimaruandJonathan Hefner cda431f538 [ruby/rdoc] fix: fix NoMethodError when token_stream is nil
The change in #1055 might be a breaking change.
So, just simply wrap `token_stream` with `Array`

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

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2023-12-05 06:21:51 +00:00
Nobuyoshi Nakada c9c1670f7e [ruby/rdoc] Markup punctuations need to be separated with a space
https://github.com/ruby/rdoc/commit/83f0149fc1
2023-12-02 12:40:12 +00:00
Nobuyoshi Nakada 7973eb7c3f [ruby/rdoc] [DOC] Slightly decorate em and strong
https://github.com/ruby/rdoc/commit/2161157205
2023-11-27 16:07:03 +00:00
Nobuyoshi Nakada 196c4aeb76 [ruby/rdoc] Place a space between certain character class letters only
https://github.com/ruby/rdoc/commit/1f568e049d
2023-11-27 15:58:31 +00:00
Nobuyoshi Nakada e374512682 [ruby/rdoc] Revert "chore: Remove unnecessary argument for join method"
This reverts commit https://github.com/ruby/rdoc/commit/4a1c74bc0a09.

Since RDoc still supports ruby 2.6 which has not deprecated `$,`, the
argument of `Array#join` is not unnecessary yet.

https://github.com/ruby/rdoc/commit/72897d32ed
2023-11-16 02:22:08 +00:00
toshimaru 8d160b9350 [ruby/rdoc] chore: Remove unnecessary argument for join method
https://github.com/ruby/rdoc/commit/4a1c74bc0a
2023-11-16 01:43:12 +00:00
toshimaru 72242e69aa [ruby/rdoc] fix: Fix NoMethodError for tokens_to_s method
Calling `tokens_to_s` gets an error if `token_stream` is nil:

```
undefined method `compact' for nil:NilClass (NoMethodError)
```

So, fall back to an empty array if `@token_stream` is nil.

https://github.com/ruby/rdoc/commit/452e4a2600
2023-11-16 01:43:12 +00:00
Nobuyoshi Nakada 9935512275 [ruby/rdoc] Fix TIDYLINK after braces
(https://github.com/ruby/rdoc/pull/1015)

TIDYLINK multi-word label should not include braces.

https://github.com/ruby/rdoc/commit/41ad3191e9
2023-11-14 07:59:56 +00:00
Hiroshi SHIBATA 7a6c72e03d Update rdoc parsers generated by racc-1.7.3 2023-11-06 17:53:00 +09:00
Hiroshi SHIBATA ee13da3e2a [ruby/rdoc] Bump up 6.6.0
https://github.com/ruby/rdoc/commit/9c14229876
2023-11-06 17:40:34 +09:00
tompng 2a8ac8ead5 [ruby/rdoc] Delay DidYouMean until NotFoundError#message is called
https://github.com/ruby/rdoc/commit/b59ca2f981
2023-10-17 11:07:57 +00:00
BurdetteLamar b4ab013b27 [DOC] Link fixes 2023-10-03 16:31:34 +09:00
Nobuyoshi Nakada dab6d55db1 [ruby/rdoc] Remove code for versions older than Ruby 2.6
https://github.com/ruby/rdoc/commit/0d10f460eb
2023-09-05 01:14:52 +00:00
Nobuyoshi Nakada 736092ec11 [ruby/rdoc] Remove code for versions older than Ruby 2.3
https://github.com/ruby/rdoc/commit/a61b777df0
2023-09-05 01:14:51 +00:00
Jeremy Evans 3f6c92e9d5 [ruby/rdoc] Omit descriptions and parameter lists for methods defined in C not mentioned in call-seq
This allows RDoc to better generate documentation for methods
following the Ruby core documentation guide (which omits aliases
in call-seq in most cases).  This makes documentation for methods
defined in C more similar to methods defined in Ruby.  For methods
defined in Ruby, the method description of the aliased method is
already not used (you have to explicitly document the alias to
use it).

Internally, this adds AnyMethod#has_call_seq? and #skip_description?,
and updates Darkfish to:

* only show the method name if there is a call-seq for the method,
  but the call-seq omits the method
* to omit the method description if the method is an alias or has
  aliases and has a call-seq that does not include the method

See discussion in https://github.com/ruby/ruby/pull/7316 for
details.

https://github.com/ruby/rdoc/commit/e3688de49b
2023-09-05 00:45:42 +00:00
theo-squadracer a14ba622da [ruby/rdoc] handle symbols declared with %s
https://github.com/ruby/rdoc/commit/ed91c4b784
2023-09-05 00:37:30 +00:00
Benoit Daloze df5330b04e [ruby/rdoc] Use a more portable way to check if code is parseable
* The same as used in irb: https://github.com/ruby/irb/pull/134/files
* This works on all Ruby implementations, unlike `return` in BEGIN which
  can be quite difficult to support.

https://github.com/ruby/rdoc/commit/d19f7c66fe
2023-07-29 15:31:48 +00:00
Masafumi Koba 62b4983416 [ruby/rdoc] [DOC] Improve CSS for "toggle source" hovering over one more method signatures
This commit improves the behavior of showing the "toggle source" element on mouseover.

For example, when a method has one more signatures by using `:call-seq:`,

```ruby
# :call-seq:
#   foo {|element| ... } -> self
#   foo -> new_enumeration
def foo
end
```

The current CSS doesn't show "toggle source" even when hovering the second signature `foo -> new_enumeration`.
But this change will show "toggle source" always when hovering over any signature.

For details about the `.method-header` element, see `lib/rdoc/generator/template/darkfish/class.rhtml`:
https://github.com/ruby/rdoc/blob/0e060c69f51ec4a877e5cde69b31d47eaeb2a2b9/lib/rdoc/generator/template/darkfish/class.rhtml#L101-L124

For example, see https://docs.ruby-lang.org/en/3.2/Array.html#method-i-delete
2023-07-05 04:09:08 +00:00
Vinicius Stock f9288fb585 [ruby/rdoc] Add source_code, homepage and changelog uris to gemspec metadata [ci skip]
https://github.com/ruby/rdoc/commit/b93687fdd0
2023-07-05 04:08:17 +00:00
gemmaro 62754503d8 [ruby/rdoc] [DOC] Fix to use KeyboardEvent.key over keyCode
https://github.com/ruby/rdoc/commit/663edc807c
2023-07-05 03:39:18 +00:00
gemmaro 77fa4787bd [ruby/rdoc] Add keydown event listener to focus on search field
https://github.com/ruby/rdoc/commit/db62e47df2
2023-07-05 03:37:28 +00:00
Petrik 0c55ef1150 [ruby/rdoc] Use flat_map for better performance
https://github.com/ruby/rdoc/commit/76192a280d
2023-06-14 23:47:25 +00:00
Hiroshi SHIBATA 6e93320c1b Update RDoc::RD parsers generated by racc-1.7.1 2023-06-14 12:56:34 +09:00
Hiroshi SHIBATA 7ef1a2387e Re-generate RDoc::RD parsers with racc-1.7.0 2023-06-08 10:20:32 +09:00
Vinicius Stock a4d92475f6 [ruby/rdoc] Auto-correct trailing new lines
https://github.com/ruby/rdoc/commit/4b68c0728a
2023-06-03 01:42:29 +00:00
Masafumi Koba 94e5ecbbdd [ruby/rdoc] Improve <summary> CSS on sidebar
- Use a smaller font size for the toggle symbol. (Currently, it seems a little too large)
- Use the child combinator (`>`) to unify selectors.
- Use `margin-left` instead of whitespace within the `content` property.
- Use `::` instead of outdated `:` for the pseudo-element symbol.
  (See https://developer.mozilla.org/en-US/docs/Web/CSS/::before)

https://github.com/ruby/rdoc/commit/61ce0a7d75
2023-05-26 16:26:46 +00:00
Masafumi Koba 54b7ce0bff [ruby/rdoc] Improve layout CSS
- Use the `grid` property for the page layout.
  - https://caniuse.com/css-grid
- Adjust the `<main>` margin.
- Make the sidebar responsive and resizable.
  - https://caniuse.com/css-math-functions
  - https://caniuse.com/css-resize

Note all modern browsers support the new CSS properties and functions used by this change.

https://github.com/ruby/rdoc/commit/2db5097c41
2023-05-26 16:24:57 +00:00
zzak 8b2884c0b5 [ruby/rdoc] Isolate root dir if specified
This ensures only files from the root directory are chosen, in order to allow a clean build from outside the source directory.

https://github.com/ruby/rdoc/commit/f3b389aa9e
2023-05-06 07:39:24 +00:00
Nobuyoshi Nakada 40438fc4d3 [ruby/rdoc] Drop the support for 2.5 or earlier because of CVE-2021-31799
https://github.com/ruby/rdoc/commit/26136138aa
2023-05-05 14:01:50 +00:00
Nobuyoshi Nakada 32cc6301b3 [ruby/rdoc] [DOC] stop documenting fallback MatchData#match_length
Also empty document of `Object`.

https://github.com/ruby/rdoc/commit/ce32a3102b
2023-05-02 17:06:36 +00:00
Nobuyoshi Nakada e47aa27dc7 [ruby/rdoc] Section may not have label
https://github.com/ruby/rdoc/commit/945f0cb3e9
2023-05-02 05:42:37 +00:00
Nobuyoshi Nakada 3833d0fee6 [ruby/rdoc] Fix references to nested label in table_of_contents
Fixes https://github.com/ruby/rdoc/pull/1000

https://github.com/ruby/rdoc/commit/291e2b7e8b
2023-05-02 04:19:46 +00:00
Nobuyoshi Nakada c2871161b4 [ruby/rdoc] Fix polynominal backtracking
Fix https://github.com/ruby/rdoc/pull/995

https://github.com/ruby/rdoc/commit/1311ca8c50
2023-04-29 16:55:37 +00:00
Nobuyoshi Nakada 85a9fd1902 [ruby/rdoc] Fix polynominal backtracking
Fix https://github.com/ruby/rdoc/pull/995

https://github.com/ruby/rdoc/commit/adfa7db5b9
2023-04-29 16:55:36 +00:00
Nobuyoshi Nakada cd65e4adca [ruby/rdoc] Use File.binread
https://github.com/ruby/rdoc/commit/987c609df9
2023-03-31 01:14:34 +00:00
Hiroshi SHIBATA 103a65316c Regenerate parsers with racc-1.6.2 2023-03-03 13:46:04 +09:00
Hiroshi SHIBATA d3d8cd304f Prefer to use File.readlines instead of IO.readlines 2023-02-27 18:49:18 +09:00
Étienne Barrié bc101f0fc1 [ruby/rdoc] Fix RDoc::Parser::Ruby not being documented
The calls to require prevent the class from being documented.

https://github.com/ruby/rdoc/commit/76283fc42e
2023-02-21 19:32:14 +09:00
zzak b171e99791 [ruby/rdoc] Actually execute RDoc document task for coverage
https://github.com/ruby/rdoc/commit/7e70d41585
2023-02-06 23:09:05 +00:00