Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ GEM
bigdecimal (>= 3.1, < 5)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
listen (3.9.0)
listen (3.10.0)
logger
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
Expand All @@ -84,14 +85,14 @@ GEM
racc (~> 1.4)
ostruct (0.6.3)
parallel (1.27.0)
parser (3.3.10.0)
parser (3.3.10.1)
ast (~> 2.4.1)
racc
power_assert (3.0.1)
pp (0.6.3)
prettyprint
prettyprint (0.2.0)
prism (1.7.0)
prism (1.8.0)
pstore (0.2.0)
psych (4.0.6)
stringio
Expand All @@ -107,7 +108,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (7.0.3)
rdoc (7.1.0)
erb
psych (>= 4.0.0)
tsort
Expand Down Expand Up @@ -141,7 +142,7 @@ GEM
rubocop-ast (1.49.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-on-rbs (1.8.0)
rubocop-on-rbs (1.9.0)
lint_roller (~> 1.1)
rbs (~> 3.5)
rubocop (>= 1.72.1, < 2.0)
Expand Down
6 changes: 3 additions & 3 deletions core/complex.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ class Complex < Numeric
# Complex.rect(1, Rational(0, 1)).to_f # => 1.0
#
# Raises RangeError if `self.imag` is not exactly zero (either `Integer(0)` or
# `Rational(0, *n*)`).
# `Rational(0, _n_)`).
#
def to_f: () -> Float

Expand All @@ -754,7 +754,7 @@ class Complex < Numeric
# Complex.rect(1, Rational(0, 1)).to_i # => 1
#
# Raises RangeError if `self.imag` is not exactly zero (either `Integer(0)` or
# `Rational(0, *n*)`).
# `Rational(0, _n_)`).
#
def to_i: () -> Integer

Expand All @@ -769,7 +769,7 @@ class Complex < Numeric
# Complex.rect(1, 0.0).to_r # => (1/1)
#
# Raises RangeError if `self.imag` is not exactly zero (either `Integer(0)` or
# `Rational(0, *n*)`) and `self.imag.to_r` is not exactly zero.
# `Rational(0, _n_)`) and `self.imag.to_r` is not exactly zero.
#
# Related: Complex#rationalize.
#
Expand Down
8 changes: 4 additions & 4 deletions core/dir.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -567,14 +567,14 @@ class Dir
#
# Dir.glob('io.?') # => ["io.c"]
#
# * `'[*set*]'`: Matches any one character in the string *set*; behaves like a
# * `'[_set_]'`: Matches any one character in the string *set*; behaves like a
# [Regexp character class](rdoc-ref:Regexp@Character+Classes), including set
# negation (`'[^a-z]'`):
#
# Dir.glob('*.[a-z][a-z]').take(3)
# # => ["CONTRIBUTING.md", "COPYING.ja", "KNOWNBUGS.rb"]
#
# * `'{*abc*,*xyz*}'`: Matches either string *abc* or string *xyz*; behaves
# * `'{_abc_,_xyz_}'`: Matches either string *abc* or string *xyz*; behaves
# like [Regexp alternation](rdoc-ref:Regexp@Alternation):
#
# Dir.glob('{LEGAL,BSDL}') # => ["LEGAL", "BSDL"]
Expand Down Expand Up @@ -631,9 +631,9 @@ class Dir
# Dir.glob('*', flags: File::FNM_DOTMATCH).take(5)
# # => [".", ".appveyor.yml", ".cirrus.yml", ".dir-locals.el", ".document"]
#
# * File::FNM_EXTGLOB: enables the pattern extension `'{*a*,*b*}'`, which
# * File::FNM_EXTGLOB: enables the pattern extension `'{_a_,_b_}'`, which
# matches pattern *a* and pattern *b*; behaves like a [regexp
# union](rdoc-ref:Regexp.union) (e.g., `'(?:*a*|*b*)'`):
# union](rdoc-ref:Regexp.union) (e.g., `'(?:_a_|_b_)'`):
#
# pattern = '{LEGAL,BSDL}'
# Dir.glob(pattern) # => ["LEGAL", "BSDL"]
Expand Down
2 changes: 1 addition & 1 deletion core/enumerable.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,7 @@ module Enumerable[unchecked out Elem] : _Each[Elem]
# Creates an enumerator for each chunked elements. The ends of chunks are
# defined by *pattern* and the block.
#
# If *`pattern* === *elt`* returns `true` or the block returns `true` for the
# If `_pattern_ === _elt_` returns `true` or the block returns `true` for the
# element, the element is end of a chunk.
#
# The `===` and *block* is called from the first element to the last element of
Expand Down
4 changes: 2 additions & 2 deletions core/file.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2239,9 +2239,9 @@ File::Separator: String
#
# #### File::FNM_EXTGLOB
#
# Flag File::FNM_EXTGLOB enables pattern `'{*a*,*b*}'`, which matches pattern
# Flag File::FNM_EXTGLOB enables pattern `'{_a_,_b_}'`, which matches pattern
# '*a*' and pattern '*b*'; behaves like a [regexp union](rdoc-ref:Regexp.union)
# (e.g., `'(?:*a*|*b*)'`):
# (e.g., `'(?:_a_|_b_)'`):
#
# pattern = '{LEGAL,BSDL}'
# Dir.glob(pattern) # => ["LEGAL", "BSDL"]
Expand Down
2 changes: 1 addition & 1 deletion core/kernel.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
#
# ### Subprocesses
#
# * [\`command`](rdoc-ref:Kernel#`): Returns the standard output of running
# * [`command`](rdoc-ref:Kernel#`): Returns the standard output of running
# `command` in a subshell.
# * #exec: Replaces current process with a new process.
# * #fork: Forks the current process into two processes.
Expand Down
8 changes: 4 additions & 4 deletions core/process.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@
#
# Use execution options to set resource limits.
#
# The keys for these options are symbols of the form `:rlimit_*resource_name`*,
# where *resource_name* is the downcased form of one of the string resource
# names described at method Process.setrlimit. For example, key `:rlimit_cpu`
# corresponds to resource limit `'CPU'`.
# The keys for these options are symbols of the form
# `:rlimit_<i>resource_name</i>`, where *resource_name* is the downcased form of
# one of the string resource names described at method Process.setrlimit. For
# example, key `:rlimit_cpu` corresponds to resource limit `'CPU'`.
#
# The value for such as key is one of:
#
Expand Down
56 changes: 28 additions & 28 deletions core/regexp.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -414,26 +414,26 @@
#
# Lookahead anchors:
#
# * `(?=*pat*)`: Positive lookahead assertion: ensures that the following
# * `(?=_pat_)`: Positive lookahead assertion: ensures that the following
# characters match *pat*, but doesn't include those characters in the
# matched substring.
#
# * `(?!*pat*)`: Negative lookahead assertion: ensures that the following
# * `(?!_pat_)`: Negative lookahead assertion: ensures that the following
# characters *do not* match *pat*, but doesn't include those characters in
# the matched substring.
#
# Lookbehind anchors:
#
# * `(?<=*pat*)`: Positive lookbehind assertion: ensures that the preceding
# * `(?<=_pat_)`: Positive lookbehind assertion: ensures that the preceding
# characters match *pat*, but doesn't include those characters in the
# matched substring.
#
# * `(?<!*pat*)`: Negative lookbehind assertion: ensures that the preceding
# * `(?<!_pat_)`: Negative lookbehind assertion: ensures that the preceding
# characters do not match *pat*, but doesn't include those characters in the
# matched substring.
#
# The pattern below uses positive lookahead and positive lookbehind to match
# text appearing in **...** tags without including the tags in the match:
# text appearing in `<b>`...`</b>` tags without including the tags in the match:
#
# /(?<=<b>)\w+(?=<\/b>)/.match("Fortune favors the <b>bold</b>.")
# # => #<MatchData "bold">
Expand Down Expand Up @@ -577,7 +577,7 @@
# re.match('1943-02-04').size # => 1
# re.match('foo') # => nil
#
# Adding one or more pairs of parentheses, `(*subexpression*)`, defines
# Adding one or more pairs of parentheses, `(_subexpression_)`, defines
# *groups*, which may result in multiple matched substrings, called *captures*:
#
# re = /(\d\d\d\d)-(\d\d)-(\d\d)/
Expand Down Expand Up @@ -649,8 +649,8 @@
#
# * For a large number of groups:
#
# * The ordinary `\*n`* notation applies only for *n* in range (1..9).
# * The `MatchData[*n*]` notation applies for any non-negative *n*.
# * The ordinary `\_n_` notation applies only for *n* in range (1..9).
# * The `MatchData[_n_]` notation applies for any non-negative *n*.
#
# * `\0` is a special backreference, referring to the entire matched string;
# it may not be used within the regexp itself, but may be used outside it
Expand All @@ -662,7 +662,7 @@
# #### Named Captures
#
# As seen above, a capture can be referred to by its number. A capture can also
# have a name, prefixed as `?<*name*>` or `?'*name*'`, and the name (symbolized)
# have a name, prefixed as `?<_name_>` or `?'_name_'`, and the name (symbolized)
# may be used as an index in `MatchData[]`:
#
# md = /\$(?<dollars>\d+)\.(?'cents'\d+)/.match("$3.67")
Expand All @@ -677,7 +677,7 @@
# /\$(?<dollars>\d+)\.(\d+)/.match("$3.67")
# # => #<MatchData "$3.67" dollars:"3">
#
# A named group may be backreferenced as `\k<*name*>`:
# A named group may be backreferenced as `\k<_name_>`:
#
# /(?<vowel>[aeiou]).\k<vowel>.\k<vowel>/.match('ototomy')
# # => #<MatchData "ototo" vowel:"o">
Expand Down Expand Up @@ -733,9 +733,9 @@
#
# #### Subexpression Calls
#
# As seen above, a backreference number (`\*n`*) or name (`\k<*name*>`) gives
# As seen above, a backreference number (`\_n_`) or name (`\k<_name_>`) gives
# access to a captured *substring*; the corresponding regexp *subexpression* may
# also be accessed, via the number (`\\g*n`*) or name (`\g<*name*>`):
# also be accessed, via the number (`\\g<i>n</i>`) or name (`\g<_name_>`):
#
# /\A(?<paren>\(\g<paren>*\))*\z/.match('(())')
# # ^1
Expand Down Expand Up @@ -770,12 +770,12 @@
#
# #### Conditionals
#
# The conditional construct takes the form `(?(*cond*)*yes*|*no*)`, where:
# The conditional construct takes the form `(?(_cond_)_yes_|_no_)`, where:
#
# * *cond* may be a capture number or name.
# * The match to be applied is *yes* if *cond* is captured; otherwise the
# match to be applied is *no*.
# * If not needed, `|*no`* may be omitted.
# * If not needed, `|_no_` may be omitted.
#
# Examples:
#
Expand Down Expand Up @@ -804,7 +804,7 @@
#
# #### Unicode Properties
#
# The `/\p{*property_name*}/` construct (with lowercase `p`) matches characters
# The `/\p{_property_name_}/` construct (with lowercase `p`) matches characters
# using a Unicode property name, much like a character class; property `Alpha`
# specifies alphabetic characters:
#
Expand Down Expand Up @@ -1038,21 +1038,21 @@
#
# Each of these modifiers sets a mode for the regexp:
#
# * `i`: `/*pattern*/i` sets [Case-Insensitive
# * `i`: `/_pattern_/i` sets [Case-Insensitive
# Mode](rdoc-ref:Regexp@Case-Insensitive+Mode).
# * `m`: `/*pattern*/m` sets [Multiline Mode](rdoc-ref:Regexp@Multiline+Mode).
# * `x`: `/*pattern*/x` sets [Extended Mode](rdoc-ref:Regexp@Extended+Mode).
# * `o`: `/*pattern*/o` sets [Interpolation
# * `m`: `/_pattern_/m` sets [Multiline Mode](rdoc-ref:Regexp@Multiline+Mode).
# * `x`: `/_pattern_/x` sets [Extended Mode](rdoc-ref:Regexp@Extended+Mode).
# * `o`: `/_pattern_/o` sets [Interpolation
# Mode](rdoc-ref:Regexp@Interpolation+Mode).
#
# Any, all, or none of these may be applied.
#
# Modifiers `i`, `m`, and `x` may be applied to subexpressions:
#
# * `(?*modifier*)` turns the mode "on" for ensuing subexpressions
# * `(?-*modifier*)` turns the mode "off" for ensuing subexpressions
# * `(?*modifier*:*subexp*)` turns the mode "on" for *subexp* within the group
# * `(?-*modifier*:*subexp*)` turns the mode "off" for *subexp* within the
# * `(?_modifier_)` turns the mode "on" for ensuing subexpressions
# * `(?-_modifier_)` turns the mode "off" for ensuing subexpressions
# * `(?_modifier_:_subexp_)` turns the mode "on" for *subexp* within the group
# * `(?-_modifier_:_subexp_)` turns the mode "off" for *subexp* within the
# group
#
# Example:
Expand Down Expand Up @@ -1168,22 +1168,22 @@
# A regular expression containing non-US-ASCII characters is assumed to use the
# source encoding. This can be overridden with one of the following modifiers.
#
# * `/*pat*/n`: US-ASCII if only containing US-ASCII characters, otherwise
# * `/_pat_/n`: US-ASCII if only containing US-ASCII characters, otherwise
# ASCII-8BIT:
#
# /foo/n.encoding # => #<Encoding:US-ASCII>
# /foo\xff/n.encoding # => #<Encoding:ASCII-8BIT>
# /foo\x7f/n.encoding # => #<Encoding:US-ASCII>
#
# * `/*pat*/u`: UTF-8
# * `/_pat_/u`: UTF-8
#
# /foo/u.encoding # => #<Encoding:UTF-8>
#
# * `/*pat*/e`: EUC-JP
# * `/_pat_/e`: EUC-JP
#
# /foo/e.encoding # => #<Encoding:EUC-JP>
#
# * `/*pat*/s`: Windows-31J
# * `/_pat_/s`: Windows-31J
#
# /foo/s.encoding # => #<Encoding:Windows-31J>
#
Expand Down Expand Up @@ -1926,7 +1926,7 @@ class Regexp
# rdoc-file=re.c
# - ~ rxp -> integer or nil
# -->
# Equivalent to *`rxp* =~ $_`:
# Equivalent to `<i>rxp</i> =~ $_`:
#
# $_ = "input data"
# ~ /at/ # => 7
Expand Down
4 changes: 2 additions & 2 deletions core/string.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# * `\&` and `\0` correspond to `$&`, which contains the complete matched
# text.
# * `\'` corresponds to `$'`, which contains the string after the match.
# * `\`` corresponds to `$``, which contains the string before the match.
# * ``` corresponds to `$``, which contains the string before the match.
# * `\+` corresponds to `$+`, which contains the last capture group.
#
# See Regexp for details.
Expand Down Expand Up @@ -559,7 +559,7 @@
# * `\&` and `\0` correspond to `$&`, which contains the complete matched
# text.
# * `\'` corresponds to `$'`, which contains the string after the match.
# * `\`` corresponds to `$``, which contains the string before the match.
# * ``` corresponds to `$``, which contains the string before the match.
# * `\+` corresponds to `$+`, which contains the last capture group.
#
# See Regexp for details.
Expand Down
2 changes: 1 addition & 1 deletion core/struct.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Struct[Elem]
# **Class Name**
#
# With string argument `class_name`, returns a new subclass of `Struct` named
# `Struct::*class_name`*:
# `Struct::<em>class_name</em>`:
#
# Foo = Struct.new('Foo', :foo, :bar) # => Struct::Foo
# Foo.name # => "Struct::Foo"
Expand Down
8 changes: 4 additions & 4 deletions stdlib/erb/0/erb.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
# in the result, the entire tag is to be omitted.
# ### Expression Tags
# You can embed a Ruby expression in a template using an *expression tag*.
# Its syntax is `<%= *expression* %>`,
# Its syntax is `<%= _expression_ %>`,
# where *expression* is any valid Ruby expression.
# When you call method #result,
# the method evaluates the expression and replaces the entire expression tag
Expand All @@ -203,7 +203,7 @@
#
# ### Execution Tags
# You can embed Ruby executable code in template using an *execution tag*.
# Its syntax is `<% *code* %>`,
# Its syntax is `<% _code_ %>`,
# where *code* is any valid Ruby code.
# When you call method #result,
# the method executes the code and removes the entire execution tag
Expand Down Expand Up @@ -270,7 +270,7 @@
# #### Shorthand Format for Execution Tags
# You can use keyword argument `trim_mode: '%'` to enable a shorthand format for
# execution tags;
# this example uses the shorthand format `% *code`* instead of `<% *code* %>`:
# this example uses the shorthand format `% _code_` instead of `<% _code_ %>`:
# template = <<TEMPLATE
# % priorities.each do |priority|
# * <%= priority %>
Expand Down Expand Up @@ -350,7 +350,7 @@
# `'<%'` and ending with `'%>'`.
# ### Comment Tags
# You can embed a comment in a template using a *comment tag*;
# its syntax is `<%# *text* %>`,
# its syntax is `<%# _text_ %>`,
# where *text* is the text of the comment.
# When you call method #result,
# it removes the entire comment tag
Expand Down
Loading