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

Generate docs based on ruby 3.4.0-rc1 #2183

Merged
merged 2 commits into from
Dec 19, 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
6 changes: 3 additions & 3 deletions .github/workflows/comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ on:
jobs:
comments:
runs-on: "ubuntu-latest"
# env:
# RUBY_COMMIT: v3_3_0
env:
RUBY_COMMIT: v3_4_0_rc1
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
ruby-version: "3.4.0-rc1"
bundler: none
- name: Install dependencies
run: |
Expand Down
3,282 changes: 1,717 additions & 1,565 deletions core/array.rbs

Large diffs are not rendered by default.

73 changes: 38 additions & 35 deletions core/basic_object.rbs
Original file line number Diff line number Diff line change
@@ -1,49 +1,44 @@
# <!-- rdoc-file=object.c -->
# BasicObject is the parent class of all classes in Ruby. It's an explicit
# blank class.
# `BasicObject` is the parent class of all classes in Ruby. In particular,
# `BasicObject` is the parent class of class Object, which is itself the default
# parent class of every Ruby class:
#
# BasicObject can be used for creating object hierarchies independent of Ruby's
# object hierarchy, proxy objects like the Delegator class, or other uses where
# namespace pollution from Ruby's methods and classes must be avoided.
# class Foo; end
# Foo.superclass # => Object
# Object.superclass # => BasicObject
#
# To avoid polluting BasicObject for other users an appropriately named subclass
# of BasicObject should be created instead of directly modifying BasicObject:
# `BasicObject` is the only class that has no parent:
#
# class MyObjectSystem < BasicObject
# end
# BasicObject.superclass # => nil
#
# BasicObject does not include Kernel (for methods like `puts`) and BasicObject
# is outside of the namespace of the standard library so common classes will not
# be found without using a full class path.
# Class `BasicObject` can be used to create an object hierarchy (e.g., class
# Delegator) that is independent of Ruby's object hierarchy. Such objects:
#
# A variety of strategies can be used to provide useful portions of the standard
# library to subclasses of BasicObject. A subclass could `include Kernel` to
# obtain `puts`, `exit`, etc. A custom Kernel-like module could be created and
# included or delegation can be used via #method_missing:
# * Do not have namespace "pollution" from the many methods provided in class
# Object and its included module Kernel.
# * Do not have definitions of common classes, and so references to such
# common classes must be fully qualified (`::String`, not `String`).
#
# class MyObjectSystem < BasicObject
# DELEGATE = [:puts, :p]
# A variety of strategies can be used to provide useful portions of the Standard
# Library in subclasses of `BasicObject`:
#
# def method_missing(name, *args, &block)
# return super unless DELEGATE.include? name
# ::Kernel.send(name, *args, &block)
# end
# * The immediate subclass could `include Kernel`, which would define methods
# such as `puts`, `exit`, etc.
# * A custom Kernel-like module could be created and included.
# * Delegation can be used via #method_missing:
#
# def respond_to_missing?(name, include_private = false)
# DELEGATE.include?(name) or super
# end
# end
# class MyObjectSystem < BasicObject
# DELEGATE = [:puts, :p]
#
# Access to classes and modules from the Ruby standard library can be obtained
# in a BasicObject subclass by referencing the desired constant from the root
# like `::File` or `::Enumerator`. Like #method_missing, #const_missing can be
# used to delegate constant lookup to `Object`:
# def method_missing(name, *args, &block)
# return super unless DELEGATE.include? name
# ::Kernel.send(name, *args, &block)
# end
#
# class MyObjectSystem < BasicObject
# def self.const_missing(name)
# ::Object.const_get(name)
# end
# end
# def respond_to_missing?(name, include_private = false)
# DELEGATE.include?(name)
# end
# end
#
# ### What's Here
#
Expand All @@ -60,6 +55,14 @@
# `self`.
# * #instance_exec: Executes the given block in the context of `self`, passing
# the given arguments.
# * #method_missing: Called when `self` is called with a method it does not
# define.
# * #singleton_method_added: Called when a singleton method is added to
# `self`.
# * #singleton_method_removed: Called when a singleton method is removed from
# `self`.
# * #singleton_method_undefined: Called when a singleton method is undefined
# in `self`.
#
class BasicObject
# <!--
Expand Down
2 changes: 1 addition & 1 deletion core/comparable.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#
# ## What's Here
#
# Module Comparable provides these methods, all of which use method `<=>`:
# Module Comparable provides these methods, all of which use method `#<=>`:
#
# * #<: Returns whether `self` is less than the given object.
# * #<=: Returns whether `self` is less than or equal to the given object.
Expand Down
Loading
Loading