Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rdoc #2160

Merged
merged 4 commits into from
Dec 17, 2024
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
7 changes: 4 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.6.3.1)
rdoc (6.9.0)
psych (>= 4.0.0)
regexp_parser (2.9.3)
rspec (3.13.0)
Expand Down Expand Up @@ -120,9 +120,9 @@ GEM
rubocop-rubycw (0.1.6)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
securerandom (0.4.0)
securerandom (0.4.1)
stackprof (0.2.26)
steep (1.9.1)
steep (1.9.2)
activesupport (>= 5.1)
concurrent-ruby (>= 1.1.10)
csv (>= 3.0.9)
Expand All @@ -137,6 +137,7 @@ GEM
securerandom (>= 0.1)
strscan (>= 1.0.0)
terminal-table (>= 2, < 4)
uri (>= 0.12.0)
stringio (3.1.2)
strong_json (2.1.2)
strscan (3.1.2)
Expand Down
26 changes: 0 additions & 26 deletions core/array.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,24 @@
# * Index 1 indicates the second element.
# * ...
#
#
# A negative index is an offset, backwards, from the end of the array:
#
# * Index -1 indicates the last element.
# * Index -2 indicates the next-to-last element.
# * ...
#
#
# A non-negative index is *in range* if and only if it is smaller than the size
# of the array. For a 3-element array:
#
# * Indexes 0 through 2 are in range.
# * Index 3 is out of range.
#
#
# A negative index is *in range* if and only if its absolute value is not larger
# than the size of the array. For a 3-element array:
#
# * Indexes -1 through -3 are in range.
# * Index -4 is out of range.
#
#
# Although the effective index into an array is always an integer, some methods
# (both within and outside of class Array) accept one or more non-integer
# arguments that are [integer-convertible
Expand Down Expand Up @@ -91,7 +87,6 @@
# Array.new(3) {Array.new(3)}
# # => [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
#
#
# A number of Ruby methods, both in the core and in the standard library,
# provide instance method `to_a`, which converts an object to an array.
#
Expand Down Expand Up @@ -122,7 +117,6 @@
# * RubyVM::InstructionSequence#to_a
# * YAML::DBM#to_a
#
#
# ## Example Usage
#
# In addition to the methods it mixes in through the Enumerable module, the
Expand Down Expand Up @@ -320,7 +314,6 @@
# * Includes [module Enumerable](rdoc-ref:Enumerable@What-27s+Here), which
# provides dozens of additional methods.
#
#
# Here, class Array provides methods that are useful for:
#
# * [Creating an Array](rdoc-ref:Array@Methods+for+Creating+an+Array)
Expand All @@ -334,14 +327,12 @@
# * [Converting](rdoc-ref:Array@Methods+for+Converting)
# * [And more....](rdoc-ref:Array@Other+Methods)
#
#
# ### Methods for Creating an Array
#
# * ::[]: Returns a new array populated with given objects.
# * ::new: Returns a new array.
# * ::try_convert: Returns a new array created from a given object.
#
#
# ### Methods for Querying
#
# * #length, #size: Returns the count of elements.
Expand All @@ -358,7 +349,6 @@
# criterion.
# * #hash: Returns the integer hash code.
#
#
# ### Methods for Comparing
#
# * #<=>: Returns -1, 0, or 1 * as `self` is less than, equal to, or greater
Expand All @@ -368,7 +358,6 @@
# * #eql?: Returns whether each element in `self` is `eql?` to the
# corresponding element in a given object.
#
#
# ### Methods for Fetching
#
# These methods do not modify `self`.
Expand Down Expand Up @@ -411,7 +400,6 @@
# * #sample: Returns one or more random elements.
# * #shuffle: Returns elements in a random order.
#
#
# ### Methods for Assigning
#
# These methods add, replace, or reorder elements in `self`.
Expand All @@ -433,7 +421,6 @@
# * #sort_by!: Replaces `self` with its elements sorted, as determined by a
# given block.
#
#
# ### Methods for Deleting
#
# Each of these methods removes elements from `self`:
Expand All @@ -450,7 +437,6 @@
# * #slice!: Removes and returns a sequence of elements.
# * #uniq!: Removes duplicates.
#
#
# ### Methods for Combining
#
# * #&: Returns an array containing elements found both in `self` and a given
Expand All @@ -470,7 +456,6 @@
# * #product: Returns or yields all combinations of elements from `self` and
# given arrays.
#
#
# ### Methods for Iterating
#
# * #each: Passes each element to a given block.
Expand All @@ -487,7 +472,6 @@
# * #repeated_permutation: Calls a given block with permutations of elements
# of `self`; a permutation may use the same element more than once.
#
#
# ### Methods for Converting
#
# * #map, #collect: Returns an array containing the block return-value for
Expand All @@ -506,7 +490,6 @@
# * #zip: Returns a new array of arrays containing `self` and given arrays;
# follow the link for details.
#
#
# ### Other Methods
#
# * #*: Returns one of the following:
Expand All @@ -516,7 +499,6 @@
# * With string argument `field_separator`, a new string that is
# equivalent to `join(field_separator)`.
#
#
# * #abbrev: Returns a hash of unambiguous abbreviations for elements.
# * #pack: Packs the elements into a binary sequence.
# * #sum: Returns a sum of elements according to either `+` or a given block.
Expand Down Expand Up @@ -1952,7 +1934,6 @@ class Array[unchecked out Elem] < Object
# * Each non-Array element is unchanged.
# * Each Array is replaced by its individual elements.
#
#
# With non-negative Integer argument `level`, flattens recursively through
# `level` levels:
#
Expand Down Expand Up @@ -2168,7 +2149,6 @@ class Array[unchecked out Elem] < Object
# * Uses recursive `element.join(separator)` if `element` is a
# `kind_of?(Array)`.
#
#
# With no argument, joins using the output field separator, `$,`:
#
# a = [:foo, 'bar', 2]
Expand Down Expand Up @@ -2292,7 +2272,6 @@ class Array[unchecked out Elem] < Object
# * The maximum-valued element from `self`.
# * A new Array of maximum-valued elements selected from `self`.
#
#
# When no block is given, each element in `self` must respond to method `<=>`
# with an Integer.
#
Expand Down Expand Up @@ -2336,7 +2315,6 @@ class Array[unchecked out Elem] < Object
# * The minimum-valued element from `self`.
# * A new Array of minimum-valued elements selected from `self`.
#
#
# When no block is given, each element in `self` must respond to method `<=>`
# with an Integer.
#
Expand Down Expand Up @@ -2606,7 +2584,6 @@ class Array[unchecked out Elem] < Object
# including both `self` and `other_arrays`.
# * The order of the returned combinations is indeterminate.
#
#
# When no block is given, returns the combinations as an Array of Arrays:
#
# a = [0, 1, 2]
Expand Down Expand Up @@ -3416,7 +3393,6 @@ class Array[unchecked out Elem] < Object
# * Zero when `a` and `b` are equivalent.
# * Positive when `a` is to follow `b`.
#
#
# Example:
#
# a = 'abcde'.split('').shuffle
Expand Down Expand Up @@ -3460,7 +3436,6 @@ class Array[unchecked out Elem] < Object
# * Zero when `a` and `b` are equivalent.
# * Positive when `a` is to follow `b`.
#
#
# Example:
#
# a = 'abcde'.split('').shuffle
Expand Down Expand Up @@ -3811,7 +3786,6 @@ class Array[unchecked out Elem] < Object
# * The *nth* element of `self`.
# * The *nth* element of each of the `other_arrays`.
#
#
# If all `other_arrays` and `self` are the same size:
#
# a = [:a0, :a1, :a2, :a3]
Expand Down
7 changes: 0 additions & 7 deletions core/complex.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,17 @@
# string arguments.
# * Method String#to_c, for certain strings.
#
#
# Note that each of the stored parts may be a an instance one of the classes
# Complex, Float, Integer, or Rational; they may be retrieved:
#
# * Separately, with methods Complex#real and Complex#imaginary.
# * Together, with method Complex#rect.
#
#
# The corresponding (computed) polar values may be retrieved:
#
# * Separately, with methods Complex#abs and Complex#arg.
# * Together, with method Complex#polar.
#
#
# ## Polar Coordinates
#
# The polar coordinates of a complex number are called the *absolute* and
Expand All @@ -46,14 +43,12 @@
# * Method Kernel#Complex, with certain string arguments.
# * Method String#to_c, for certain strings.
#
#
# Note that each of the stored parts may be a an instance one of the classes
# Complex, Float, Integer, or Rational; they may be retrieved:
#
# * Separately, with methods Complex#abs and Complex#arg.
# * Together, with method Complex#polar.
#
#
# The corresponding (computed) rectangular values may be retrieved:
#
# * Separately, with methods Complex#real and Complex#imag.
Expand Down Expand Up @@ -205,10 +200,8 @@ class Complex < Numeric
# * `object.imag == 0`. # Always true if object is numeric but not
# complex.
#
#
# * `nil` otherwise.
#
#
# Examples:
#
# Complex(2) <=> 3 # => -1
Expand Down
63 changes: 0 additions & 63 deletions core/constants.rbs
Original file line number Diff line number Diff line change
@@ -1,96 +1,33 @@
# <!-- rdoc-file=io.c -->
# ARGF is a stream designed for use in scripts that process files given as
# command-line arguments or passed in via STDIN.
#
# See ARGF (the class) for more details.
#
ARGF: RBS::Unnamed::ARGFClass

# <!-- rdoc-file=ruby.c -->
# ARGV contains the command line arguments used to run ruby.
#
# A library like OptionParser can be used to process command-line arguments.
#
ARGV: Array[String]

CROSS_COMPILING: true?

# <!-- rdoc-file=ruby.c -->
# DATA is a File that contains the data section of the executed file. To create
# a data section use `__END__`:
#
# $ cat t.rb
# puts DATA.gets
# __END__
# hello world!
#
# $ ruby t.rb
# hello world!
#
DATA: File

# <!-- rdoc-file=version.c -->
# The copyright string for ruby
#
RUBY_COPYRIGHT: String

# <!-- rdoc-file=version.c -->
# The full ruby version string, like `ruby -v` prints
#
RUBY_DESCRIPTION: String

# <!-- rdoc-file=version.c -->
# The engine or interpreter this ruby uses.
#
RUBY_ENGINE: String

# <!-- rdoc-file=version.c -->
# The version of the engine or interpreter this ruby uses.
#
RUBY_ENGINE_VERSION: String

# <!-- rdoc-file=version.c -->
# The patchlevel for this ruby. If this is a development build of ruby the
# patchlevel will be -1
#
RUBY_PATCHLEVEL: Integer

# <!-- rdoc-file=version.c -->
# The platform for this ruby
#
RUBY_PLATFORM: String

# <!-- rdoc-file=version.c -->
# The date this ruby was released
#
RUBY_RELEASE_DATE: String

# <!-- rdoc-file=version.c -->
# The GIT commit hash for this ruby.
#
RUBY_REVISION: String

# <!-- rdoc-file=version.c -->
# The running version of ruby
#
RUBY_VERSION: String

# <!-- rdoc-file=io.c -->
# Holds the original stderr
#
STDERR: IO

# <!-- rdoc-file=io.c -->
# Holds the original stdin
#
STDIN: IO

# <!-- rdoc-file=io.c -->
# Holds the original stdout
#
STDOUT: IO

# <!-- rdoc-file=vm.c -->
# The Binding of the top level scope
#
TOPLEVEL_BINDING: Binding
Loading
Loading