Skip to content

Commit a002163

Browse files
authored
Merge pull request #2722 from ksss/backport-rdoc-6.16
Backport rdoc 6.16
2 parents 2e0e012 + 3f8ac03 commit a002163

File tree

9 files changed

+21
-44
lines changed

9 files changed

+21
-44
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ gem "json-schema"
1616
gem "goodcheck"
1717
gem 'digest'
1818
gem 'tempfile'
19-
gem "rdoc"
19+
gem "rdoc", "~> 6.16"
2020
gem "fileutils"
2121
gem "raap"
2222
gem "activesupport", "~> 7.0"

Gemfile.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ GEM
9595
rb-fsevent (0.11.2)
9696
rb-inotify (0.11.1)
9797
ffi (~> 1.0)
98-
rdoc (6.13.1)
98+
rdoc (6.16.0)
99+
erb
99100
psych (>= 4.0.0)
100101
regexp_parser (2.10.0)
101102
rspec (3.13.0)
@@ -202,7 +203,7 @@ DEPENDENCIES
202203
rake-compiler
203204
rbs!
204205
rbs-amber!
205-
rdoc
206+
rdoc (~> 6.16)
206207
rspec
207208
rubocop
208209
rubocop-on-rbs

core/kernel.rbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,10 +1814,10 @@ module Kernel : BasicObject
18141814
# and returns a `true` or `false`;
18151815
# returns `false` if either entity does not exist:
18161816
# Character |Test
1817-
# ------------|---------------------------------------------------------------
1818-
# <tt>'<'</tt>|Whether the `mtime` at `path0` is less than that at `path1`.
1819-
# <tt>'='</tt>|Whether the `mtime` at `path0` is equal to that at `path1`.
1820-
# <tt>'>'</tt>|Whether the `mtime` at `path0` is greater than that at `path1`.
1817+
# ------------|------------------------------------------------------------------------------------------------
1818+
# <tt>'<'</tt>|Whether the <code>mtime</code> at <code>path0</code> is less than that at <code>path1</code>.
1819+
# <tt>'='</tt>|Whether the <code>mtime</code> at <code>path0</code> is equal to that at <code>path1</code>.
1820+
# <tt>'>'</tt>|Whether the <code>mtime</code> at <code>path0</code> is greater than that at <code>path1</code>.
18211821
# * This test operates on the content of each of the entities at `path0` and
18221822
# `path1`,
18231823
# and returns a `true` or `false`;

core/thread.rbs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -367,20 +367,16 @@ class Thread < Object
367367
# - Thread.new { ... } -> thread
368368
# - Thread.new(*args, &proc) -> thread
369369
# - Thread.new(*args) { |args| ... } -> thread
370+
# - Creates a new thread executing the given block.
371+
# - Any +args+ given to ::new will be passed to the block:
372+
# - arr = []
373+
# - a, b, c = 1, 2, 3
374+
# - Thread.new(a,b,c) { |d,e,f| arr << d << e << f }.join
375+
# - arr #=> [1, 2, 3]
376+
# - A ThreadError exception is raised if ::new is called without a block.
377+
# - If you're going to subclass Thread, be sure to call super in your
378+
# - +initialize+ method, otherwise a ThreadError will be raised.
370379
# -->
371-
# Creates a new thread executing the given block.
372-
#
373-
# Any `args` given to ::new will be passed to the block:
374-
#
375-
# arr = []
376-
# a, b, c = 1, 2, 3
377-
# Thread.new(a,b,c) { |d,e,f| arr << d << e << f }.join
378-
# arr #=> [1, 2, 3]
379-
#
380-
# A ThreadError exception is raised if ::new is called without a block.
381-
#
382-
# If you're going to subclass Thread, be sure to call super in your `initialize`
383-
# method, otherwise a ThreadError will be raised.
384380
#
385381
def initialize: (*untyped) { (?) -> void } -> void
386382

lib/rdoc/discover.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
begin
4-
gem 'rdoc', '~> 6.13'
4+
gem 'rdoc', '~> 6.16'
55
require 'rdoc_plugin/parser'
66
module RDoc
77
class Parser

lib/rdoc_plugin/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def parse_method_decl(decl:, context:, outer_name: nil)
7676
method.visibility = decl.visibility
7777
method.call_seq = decl.overloads.map {|overload| "#{decl.name.to_s}#{overload.method_type.to_s}" }.join("\n")
7878
if loc = decl.location
79-
method.start_collecting_tokens
79+
method.start_collecting_tokens(:ruby)
8080
method.add_token({ line_no: 1, char_no: 1, kind: :on_comment, text: "# File #{@top_level.relative_name}, line(s) #{loc.start_line}:#{loc.end_line}\n" })
8181
method.add_token({ line_no: 1, char_no: 1, text: loc.source })
8282
method.line = loc.start_line

stdlib/openssl/0/openssl.rbs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9524,49 +9524,29 @@ module OpenSSL
95249524
# of both is present, a TimestampError will be raised when trying to create a
95259525
# Response.
95269526
#
9527-
# call-seq:
9528-
# factory.default_policy_id = "string" -> string
9529-
# factory.default_policy_id -> string or nil
9530-
#
95319527
# ### serial_number
95329528
#
95339529
# Sets or retrieves the serial number to be used for timestamp creation. Must be
95349530
# present for timestamp creation.
95359531
#
9536-
# call-seq:
9537-
# factory.serial_number = number -> number
9538-
# factory.serial_number -> number or nil
9539-
#
95409532
# ### gen_time
95419533
#
95429534
# Sets or retrieves the Time value to be used in the Response. Must be present
95439535
# for timestamp creation.
95449536
#
9545-
# call-seq:
9546-
# factory.gen_time = Time -> Time
9547-
# factory.gen_time -> Time or nil
9548-
#
95499537
# ### additional_certs
95509538
#
95519539
# Sets or retrieves additional certificates apart from the timestamp certificate
95529540
# (e.g. intermediate certificates) to be added to the Response. Must be an Array
95539541
# of OpenSSL::X509::Certificate.
95549542
#
9555-
# call-seq:
9556-
# factory.additional_certs = [cert1, cert2] -> [ cert1, cert2 ]
9557-
# factory.additional_certs -> array or nil
9558-
#
95599543
# ### allowed_digests
95609544
#
95619545
# Sets or retrieves the digest algorithms that the factory is allowed create
95629546
# timestamps for. Known vulnerable or weak algorithms should not be allowed
95639547
# where possible. Must be an Array of String or OpenSSL::Digest subclass
95649548
# instances.
95659549
#
9566-
# call-seq:
9567-
# factory.allowed_digests = ["sha1", OpenSSL::Digest.new('SHA256').new] -> [ "sha1", OpenSSL::Digest) ]
9568-
# factory.allowed_digests -> array or nil
9569-
#
95709550
class Factory
95719551
def additional_certs: () -> Array[X509::Certificate]?
95729552

stdlib/rdoc/0/rdoc.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module RDoc
8484
# -->
8585
# Starts collecting tokens
8686
#
87-
def collect_tokens: () -> void
87+
def collect_tokens: (Symbol) -> void
8888

8989
# <!--
9090
# rdoc-file=lib/rdoc/token_stream.rb

stdlib/strscan/0/string_scanner.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
# Method | Return After Match |Return After No Match
328328
# ---------------|---------------------------------------|---------------------
329329
# #size | Count of captured substrings. | +nil+.
330-
# #[](n) | <tt>n</tt>th captured substring. | +nil+.
330+
# #{}[n] | <tt>n</tt>th captured substring. | +nil+.
331331
# #captures | Array of all captured substrings. | +nil+.
332332
# #values_at(*n) |Array of specified captured substrings.| +nil+.
333333
# #named_captures| Hash of named captures. | <tt>{}</tt>.

0 commit comments

Comments
 (0)