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

[DOC] Enhanced RDoc for parser methods #68

Merged
merged 3 commits into from
Aug 2, 2022
Merged

[DOC] Enhanced RDoc for parser methods #68

merged 3 commits into from
Aug 2, 2022

Conversation

BurdetteLamar
Copy link
Member

Treats:

  • ::_httpdate
  • ::_iso8601
  • ::_jisx0301
  • ::_parse
  • ::_rfc2822
  • ::_rfc3339
  • ::_xmlschema
  • ::httpdate
  • ::iso8601
  • ::jisx0301
  • ::parse
  • ::rfc2822
  • ::rfc3339
  • ::xmlschema

ext/date/date_core.c Show resolved Hide resolved
ext/date/date_core.c Outdated Show resolved Hide resolved
ext/date/date_core.c Outdated Show resolved Hide resolved
ext/date/date_core.c Outdated Show resolved Hide resolved
ext/date/date_core.c Outdated Show resolved Hide resolved
ext/date/date_core.c Outdated Show resolved Hide resolved
Copy link
Member

@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@BurdetteLamar BurdetteLamar merged commit 24bdab6 into ruby:master Aug 2, 2022
matzbot pushed a commit to ruby/ruby that referenced this pull request Aug 2, 2022
Treats:
    ::_httpdate
    ::_iso8601
    ::_jisx0301
    ::_parse
    ::_rfc2822
    ::_rfc3339
    ::_xmlschema
    ::httpdate
    ::iso8601
    ::jisx0301
    ::parse
    ::rfc2822
    ::rfc3339
    ::xmlschema

ruby/date@24bdab600a
maximecb added a commit to Shopify/ruby that referenced this pull request Aug 4, 2022
* Change ROBJECT_TRANSIENT_FLAG to use FL_USER2

* [rubygems/rubygems] Bump rb-sys

Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.20 to 0.9.26.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](oxidize-rb/rb-sys@v0.9.20...v0.9.26)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

rubygems/rubygems@fe76234cf1

* For rdoc, copy doc/rdoc to doc/ (ruby#6181)

* Fix sync_default_gems.rb to use absolute path

* Sync RDoc

* * append newline at EOF. [ci skip]

* [ruby/rdoc] Move section Directives into section Blocks (ruby/rdoc#901)

ruby/rdoc@e48e07ef53

* Fix `rb_profile_frames` output includes dummy main thread frame

The `rb_profile_frames` API did not skip the two dummy frames that
each thread has at its beginning. This was unlike `backtrace_each` and
`rb_ec_parcial_backtrace_object`, which do skip them.

This does not seem to be a problem for non-main thread frames,
because both `VM_FRAME_RUBYFRAME_P(cfp)` and
`rb_vm_frame_method_entry(cfp)` are NULL for them.

BUT, on the main thread `VM_FRAME_RUBYFRAME_P(cfp)` was true
and thus the dummy thread was still included in the output of
`rb_profile_frames`.

I've now made `rb_profile_frames` skip this extra frame (like
`backtrace_each` and friends), as well as add a test that asserts
the size and contents of `rb_profile_frames`.

Fixes [Bug #18907] (<https://bugs.ruby-lang.org/issues/18907>)

* 8fa6646 is broken with rubygems/rubygems and flori/json.

Revert "Fix sync_default_gems.rb to use absolute path"

This reverts commit 8fa6646.

* Merge rubygems/bundler HEAD

  Merge from rubygems/rubygems@2af2520

* Cheaply derive code range for String#b return value

The result of String#b is a string with an ASCII_8BIT/BINARY encoding. That encoding is ASCII-compatible and has no byte sequences that are invalid for the encoding. If we know the receiver's code range, we can derive the resulting string's code range without needing to perform a full code range scan.

* Adjust indent [ci skip]

* Try the tag without "v" prefix to checkout upstream repositories

* Remove ary_discard

ary_discard should not be used as it should be handled by the GC. The
only user of ary_discard is rb_ary_product, which doesn't neeed to use
ary_discard.

* Rename rb_ary_tmp_new to rb_ary_hidden_new

rb_ary_tmp_new suggests that the array is temporary in some way, but
that's not true, it just creates an array that's hidden and not on the
transient heap. This commit renames it to rb_ary_hidden_new.

* Use rb_ary_hidden_new for rb_ary_hidden_new_fill

* [rubygems/rubygems] Use main as default branch for Bundler specs

rubygems/rubygems@482077d185

* * 2022-07-27 [ci skip]

* Add doc/rdoc directory to .document

Adding the doc/rdoc directory to .document will allow files in that
directory to be included in the documentation.

* Refactored poisoning and unpoisoning freelist to simpler API

* * expand tabs. [ci skip]

Tabs were expanded because the file did not have any tab indentation in unedited lines.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.

* [rubygems/rubygems] Completely drop base parameter from index

This parameter was coupling the concept of lockfile with the index. I
don't think it's necessary.

Also I believe it's causing some flaky test failures, which might leak
into realworld issues. They are like this:

````
Invoking `/opt/hostedtoolcache/Ruby/3.0.4/x64/bin/ruby -I/home/runner/work/rubygems/rubygems/bundler/spec -r/home/runner/work/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -r/home/runner/work/rubygems/rubygems/bundler/spec/support/hax.rb /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle lock` failed with output:
----------------------------------------------------------------------
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
NoMethodError: undefined method `identifier' for #<Gem::Specification:0x00005639ad0db0a0 @extension_dir=nil, @full_gem_path=nil, @gem_dir=nil, @ignored=nil, @bin_dir=nil, @cache_dir=nil, @cache_file=nil, @doc_dir=nil, @ri_dir=nil, @spec_dir=nil, @spec_file=nil, @gems_dir=nil, @base_dir=nil, @loaded=false, @activated=false, @loaded_from=nil, @original_platform="ruby", @installed_by_version=nil, @autorequire=nil, @Date=2022-07-25 00:00:00 UTC, @description="This is a completely fake gem, for testing purposes.", @email="[email protected]", @homepage="http://example.com", @name="win32-process", @post_install_message=nil, @signing_key=nil, @summary="This is just a fake gem for testing", @Version=#<Gem::Version "0.8.3">, @authors=["no one"], @bindir="bin", @cert_chain=[], @Dependencies=[<Gem::Dependency type=:runtime name="ffi" requirements=">= 1.0.0">], @executables=[], @extensions=[], @extra_rdoc_files=[], @files=[], @licenses=[], @metadata={}, @platform="ruby", @rdoc_options=[], @require_paths=["lib"], @required_ruby_version=#<Gem::Requirement:0x00005639ad0dbc80 @requirements=[[">=", #<Gem::Version "0">]]>, @required_rubygems_version=#<Gem::Requirement:0x00005639ad0dba50 @requirements=[[">=", #<Gem::Version "0">]]>, @requirements=[], @rubygems_version="3.2.33", @specification_version=4, @test_files=[], @new_platform="ruby", @full_name="win32-process-0.8.3", @has_rdoc=true, @license=["MIT"] win32-process-0.8.3>
  /home/runner/work/rubygems/rubygems/bundler/tmp/rubygems/lib/rubygems/specification.rb:2116:in `method_missing'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/remote_specification.rb:115:in `method_missing'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/lazy_specification.rb:34:in `eql?'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:189:in `eql?'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:189:in `search_by_dependency'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:96:in `local_search'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:64:in `unsorted_search'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:60:in `search'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:179:in `results_for'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:113:in `search_for'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:216:in `block in sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:207:in `each'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:207:in `sort_by'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:207:in `sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:727:in `activate_new_spec'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:254:in `process_topmost_state'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:182:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:50:in `start'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:24:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/definition.rb:480:in `reresolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/definition.rb:283:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/definition.rb:181:in `resolve_remotely!'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/lock.rb:53:in `run'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:674:in `lock'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:31:in `dispatch'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:25:in `start'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:48:in `block in <top (required)>'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:36:in `<top (required)>'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:23:in `load'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:23:in `<main>'
```
````

I think the issue is that now we eagerly materialize some base
specifications before resolving in order to give better errors if user
specified an incorrect source in the Gemfile.

This means that the key for the index hash will have heterogeneous
specification objects (some LazySpecification, some real Specification),
and `LazySpecification#eql?` is incompatible with that.

By dropping the base parameter from the index, we should no longer have
these heterogenous objects as hash keys.

rubygems/rubygems@dc179d41c3

* [rubygems/rubygems] Don't use Pathname for creating extension dir

Not sure why, but I run into the following flaky test failure

````
(...)

Invoking `/Users/deivid/.asdf/installs/ruby/3.1.2/bin/ruby -I/Users/deivid/Code/rubygems/rubygems/bundler/spec -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/hax.rb /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/bin/bundle install` failed with output:
----------------------------------------------------------------------
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
NameError: constant Pathname::FileUtils not defined

    FileUtils.mkpath(@path, mode: mode)
    ^^^^^^^^^
  /Users/deivid/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0/pathname.rb:585:in `mkpath'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/shared_helpers.rb:103:in `filesystem_access'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/rubygems_gem_installer.rb:78:in `build_extensions'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/source/rubygems.rb:207:in `install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:62:in `apply_func'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:54:in `loop'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:54:in `process_queue'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

(...)
```

Whatever it was, this small change should fix it.

rubygems/rubygems@71d7503ce4

* [ruby/rdoc] [DOC] Clarifications for directives (ruby/rdoc#903)

-  Former section "Directives in Trailing Comments" is reworked. The important thing about a directive is what it does, not whether it's trailing or stand-alone. Therefore I've worked the directives in the former section into the appropriate sections, based on function.
- Each directive is now explicitly marked as trailing or stand-alone.
- C-code directives are mentioned only for those directives that actually appear in our ruby/ruby C files, which are :startdoc:, :stopdoc:, :enddoc:, :include:, and :call-seq:. What effect, if any, other directives have in C, I'm not sure about.

ruby/rdoc@b00978bfa5

* [rubygems/rubygems] Add ignore_funding_requests config flag

rubygems/rubygems@ab302f72c9

* Manually sync with ruby/date#64

* Do not load library files from repository only for test

What we want to test should be the bundled and to be installed files,
but not the upstream.

* Make indents and newlines consistent [ci skip]

* Append semicolons [ci skip]

* Adjust styles [ci skip]

* [ruby/pathname] Fix `autoload` of `FileUtils`

Should not be `Pathname::FileUtils`.

ruby/pathname@d1eb366e73

* [ci-skip]Document how to run an individual bootstrap test

* Update to ruby/mspec@290e36a

* Update to ruby/spec@cbfaf51

* * 2022-07-28 [ci skip]

* Fix documentation for ARGF.inplace_mode{,=}

The value affects the name of the backup file created, not the
name of the file modified (as the file is modified in place).

Fixes [Bug #18920]

* [DOC] Cross references for `ARGF`

* Suppress use-after-free warning by gcc-12

* Try reproducing the MinGW hang on time command (ruby#6168)

to see if it really exits correctly. 

GitHub Support asked me to confirm the command is exiting correctly.

* `RUBY_DEBUG_LOG2` should filter against the given `file`

* Also skip the failing test similar with a343952

* test_io_console.rbL399 is also randomly failing same as bfc697f

* Fix the missing brackets

* Skip randomly failing tests with FreeBSD 12

* Refactor gc_ref_update_array

* Make array slices views rather than copies

Before this commit, if the slice fits in VWA, it would make a copy
rather than a view. This is slower as it requires a memcpy of the
contents.

* Lock the VM for rb_gc_writebarrier_unprotect

When using Ractors, rb_gc_writebarrier_unprotect requries a VM lock
since it modifies the bitmaps.

* Fix format specifier for `rb_ractor_id()`

* Fix conversion of `rb_ractor_id()`

* Fix format-pedantic warnings

* [ruby/rdoc] [DOC] Add some links in intro; delimit rendered HTML output. (ruby/rdoc#904)

ruby/rdoc@c02645364f

* YJIT: Teach getblockparamproxy to handle the no-block case without exiting (ruby#6191)

Teach getblockparamproxy to handle the no-block case without exiting

Co-authored-by: John Hawthorn <[email protected]>

Co-authored-by: John Hawthorn <[email protected]>

* * 2022-07-29 [ci skip]

* [ruby/rdoc] Link from RDoc::Markup to RDoc::MarkupReference (ruby/rdoc#906)

Recently new RDoc::MarkupReference replaces Markup Reference in RDoc::Markup (which was always the goal).

ruby/rdoc@825be7eaf4

* [ruby/date] [DOC] Enhanced RDoc for <=> (ruby/date#65)

ruby/date@0cdbaa92e9

* Revert "Try reproducing the MinGW hang on time command (ruby#6168)"

This reverts commit bee5089.

Looking at https://github.com/ruby/ruby/runs/7564065637?check_suite_focus=true,
we concluded that the ruby process for test-all is stuck before exit
when this issue reproduces.

However, because of our limited bandwidth to support MinGW, we're not
investigating this, and therefore we need to keep skipping tests that
hang on this environment.

* [ruby/rdoc] Fix formatting blockquote in verbatim

Reported at ruby/rdoc#907 (comment)

ruby/rdoc@86384ac7f9

* Merge rubygems master from rubygems/rubygems@446cc57

* [rubygems/rubygems] Add package/pack aliases to man pages for cache

Signed-off-by: Takuya Noguchi <[email protected]>

rubygems/rubygems@1685e3a9dc

* [rubygems/rubygems] Fix dead links to deprecated bundle-package(1) with bundler-cache(1)

Signed-off-by: Takuya Noguchi <[email protected]>

rubygems/rubygems@9c2e80a10f

* Merge ruby/fileutils from ruby/fileutils@332025b

* [ruby/optparse] Also accept '-' as an optional argument (ruby/optparse#35)

ruby/optparse@f2b8318631

* fix typo in Time#xmlschema documentation

* [flori/json] Stop including the parser source __LINE__ in exceptions

It makes testing for JSON errors very tedious. You either have
to use a Regexp or to regularly update all your assertions
when JSON is upgraded.

ruby/json@de9eb1d28e

* [flori/json] test parsing of unicode, mixing literal characters with escaped

ruby/json@82fe866da2

* Update parser-text.rb with ruby/racc@4ecc13c

* Keep gitignore for libyaml source with psych

* [ruby/rdoc] Add block quotes (ruby/rdoc#907)

Also adjusts which blocks may be nested.

ruby/rdoc@dde1860441

* [rubygems/rubygems] No need to set anything at all unless standalone is given

rubygems/rubygems@d695c8da3e

* [rubygems/rubygems] Make `--standalone` play nice with `--local`

I'm not sure if using relative paths in the generated script is best for
this case, since it makes the script not movable, but that can be
improved later.

rubygems/rubygems@7f5bdbb842

* * 2022-07-30 [ci skip]

* [ruby/date] [DOC] Enhanced RDoc (ruby/date#66)

Treats:
    #===
    #to_s
    #inspect
    #strftme
    #asctime
    #iso3601
    #rfc3339
    #rfc2822
    #httpdate
    #jisx0301

ruby/date@aed66fedf6

* Add --enable-yjit=stats configure option

* Add --enable-yjit=dev_nodebug configure option

* [ruby/rdoc] Fix blockquote with word in verbatim

ruby/rdoc@75eee668a5

* [ruby/digest] Revert tab-expansion in external files

ruby/digest@5ca2b5b91e

* * expand tabs. [ci skip]

Tabs were expanded because the file did not have any tab indentation in unedited lines.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.

* Revert "* expand tabs. [ci skip]"

This reverts commit 8a65cf3.

* Update .git-blame-ignore-revs [ci skip]

* [ruby/io-nonblock] Revert tab expansion

* Update .git-blame-ignore-revs [ci skip]

* * expand tabs. [ci skip]

Tabs were expanded because the file did not have any tab indentation in unedited lines.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.

* Revert "* expand tabs. [ci skip]"

This reverts commit 0d842fe.

* Update .git-blame-ignore-revs [ci skip]

* Implement Enumerator::Product and Enumerator.product [Feature #18685]

* Mention Enumerator.product/Enumerator::Product in the NEWS.md

* [ruby/date] Enhanced RDoc (ruby/date#67)

Treats:
    ::httpdate
    #to_date
    #to_time
    #to_datetime
In behalf of ::httpdate, I've introduced section "Argument limit" that can be pointed to by various Date methods (similar to existing section "Argument start"). This will involve 8 already-enhanced methods plus 8 more not yet done.

ruby/date@00326ff99c

* * 2022-07-31 [ci skip]

* [rubygems/rubygems] Update bundle-platform(1) man

Signed-off-by: Takuya Noguchi <[email protected]>

rubygems/rubygems@1c3736f5af

* * 2022-08-01 [ci skip]

* Initialize node_id

In some causes node_id might have been left uninitialized leading to
undefined behavior on access. So always set it to -1, so we have *some*
valid value in there.

* Fix a link [ci skip]

* respect current frame of `rb_eval_string`

`self` is nearest Ruby method's `self`.
If there is no ruby frame, use toplevel `self` (`main`).

https://bugs.ruby-lang.org/issues/18780

* [rubygems/rubygems] Fix comment incorrectly copied from another spec

rubygems/rubygems@9be5eae9cf

* [rubygems/rubygems] Fix crash when running `bundle outdated` in debug mode

Previously it would crash like this:

````
$ /Users/deivid/.asdf/installs/ruby/3.1.2/bin/ruby -I/Users/deivid/Code/rubygems/rubygems/bundler/spec -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/hax.rb /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle outdated --patch --strict --filter-patch
Running `bundle outdated --filter-patch --patch --strict` with bundler 2.4.0.dev
Found changes from the lockfile, re-resolving dependencies because bundler is unlocking Using a local server, bundler won't use the CompactIndex API
Fetching source index from file:///Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/remote4/
Resolving dependencies...
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
RuntimeError: LazySpecification has not been materialized yet (calling :loaded_from [])
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/lazy_specification.rb:147:in `method_missing'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:214:in `gem_column_for'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:174:in `block in print_gems_table'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:173:in `map'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:173:in `print_gems_table'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:123:in `run'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:420:in `outdated'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:31:in `dispatch'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:25:in `start'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:48:in `block in <top (required)>'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:36:in `<top (required)>'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:25:in `load'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:25:in `<main>'
```
````

rubygems/rubygems@23c46f3b57

* [rubygems/rubygems] Bump rb-sys

Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.26 to 0.9.28.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](oxidize-rb/rb-sys@v0.9.26...v0.9.28)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

rubygems/rubygems@831a001697

* * 2022-08-02 [ci skip]

* [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name

Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.26 to 0.9.28.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](oxidize-rb/rb-sys@v0.9.26...v0.9.28)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

rubygems/rubygems@edea8fbfa0

* [rubygems/rubygems] Move some logic to `LazySpecification#__materialize__`

rubygems/rubygems@5e100df7c9

* [rubygems/rubygems] Remove unnecessary special case for Bundler

rubygems/rubygems@2777e79b8e

* [rubygems/rubygems] Fix incorrect force_ruby_platform propagation

It was just working by chance.

(cherry picked from commit rubygems/rubygems@16b2d6bfe893)

rubygems/rubygems@8f922d980f

* [rubygems/rubygems] Refactor materialization conditions

rubygems/rubygems@08e1554fb6

* [rubygems/rubygems] This should go through the standard source search logic

rubygems/rubygems@087e3e4e3b

* [rubygems/rubygems] Only need to filter platforms when materialization is not strict

rubygems/rubygems@9d878cbda0

* [rubygems/rubygems] Prefer reverse+find to select+last

rubygems/rubygems@ffb161bb69

* [rubygems/rubygems] Remove unnecessary local variable

rubygems/rubygems@a997210473

* [rubygems/rubygems] Materializing for resolution already filters platforms

rubygems/rubygems@9f4ba9ebb0

* [rubygems/rubygems] Don't discard candidates matching ruby metadata

Do dependency filtering and materialization in one step. Before,
dependency filtering would not consider ruby metadata so it would
discard variants that end up not being materializable in the end.

rubygems/rubygems@0c0d40d417

Co-authored-by: Ian Ker-Seymer <[email protected]>

* [rubygems/rubygems] Check for errors in error stream

rubygems/rubygems@7b0f7804f2

* [rubygems/rubygems] Preserve the previous behavior of raising an error when in frozen mode

rubygems/rubygems@6e35a6edfe

* [Bug #17767] Now `ENV.clone` raises `TypeError` as well as `ENV.dup`

One year ago, the former method has been deprecated while the latter
has become an error.  Then the 3.1 released, it is enough time to make
also the former an error.

* Implement Queue#pop(timeout: sec)

[Feature #18774]

As well as `SizedQueue#pop(timeout: sec)`

If both `non_block=true` and `timeout:` are supplied, ArgumentError
is raised.

* [rubygems/rubygems] Fix arguments for bundle-config(1) docs

Signed-off-by: Takuya Noguchi <[email protected]>

rubygems/rubygems@3e62ca776d

* [rubygems/rubygems] Array is already uniq, no need to deduplicate it

rubygems/rubygems@3212ae14b7

* [DOC] Specify ways to run bootstrap tests

* Speed up setting the backref match object

This patch speeds up setting the backref match object by avoiding some
memcopies.  Take the following code for example:

```ruby
"hello world" =~ /hello/
p $~
```

When the RE matches the string, we have to set the Match object in the
backref global.  So we would allocate a match object[^1] and use
`rb_reg_region_copy`[^2] to make a deep copy of the stack allocated
`re_registers` struct[^3] in to the newly created Ruby object.  This
could possibly trigger GC[^4], and would allocate new memory.

This patch makes a shallow copy of the `re_registers` struct on to the
Match object allowing the match object to manage the `re_registers`
pointer and also avoiding some calls to `xmalloc` and some manual
memcopy.

Benchmark looks like this:

```ruby

require "benchmark/ips"

def test_re thing
  thing =~ /hello/
end

Benchmark.ips do |x|
  x.report("re hit") do
    test_re "hello world"
  end

  x.report("re miss") do
    test_re "world"
  end
end
```

Before this patch:

```
$ ruby -v test.rb
ruby 3.2.0dev (2022-07-27T22:29:00Z master 4ad6989) [arm64-darwin21]
Ignoring bcrypt-3.1.16 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.16
Warming up --------------------------------------
              re hit   345.401k i/100ms
             re miss   673.584k i/100ms
Calculating -------------------------------------
              re hit      3.452M (± 0.5%) i/s -     17.270M in   5.002535s
             re miss      6.736M (± 0.4%) i/s -     34.353M in   5.099593s
```

After this patch:

```
$ ./ruby -v test.rb
ruby 3.2.0dev (2022-08-01T21:24:12Z less-memcpy 0ff2a56606) [arm64-darwin21]
Warming up --------------------------------------
              re hit   419.578k i/100ms
             re miss   673.251k i/100ms
Calculating -------------------------------------
              re hit      4.201M (± 0.7%) i/s -     21.398M in   5.093593s
             re miss      6.716M (± 0.4%) i/s -     33.663M in   5.012756s
```

Matches get faster and misses maintain the same speed

[^1]: https://github.com/ruby/ruby/blob/24204d54ab730791bfbd0cd66b8e12f0bd62ca5d/re.c#L1737
[^2]: https://github.com/ruby/ruby/blob/24204d54ab730791bfbd0cd66b8e12f0bd62ca5d/re.c#L1738
[^3]: https://github.com/ruby/ruby/blob/24204d54ab730791bfbd0cd66b8e12f0bd62ca5d/re.c#L1686
[^4]: https://github.com/ruby/ruby/blob/24204d54ab730791bfbd0cd66b8e12f0bd62ca5d/re.c#L981

* * 2022-08-03 [ci skip]

* [ruby/date] [DOC] Enhanced RDoc for parser methods (ruby/date#68)

Treats:
    ::_httpdate
    ::_iso8601
    ::_jisx0301
    ::_parse
    ::_rfc2822
    ::_rfc3339
    ::_xmlschema
    ::httpdate
    ::iso8601
    ::jisx0301
    ::parse
    ::rfc2822
    ::rfc3339
    ::xmlschema

ruby/date@24bdab600a

* [ruby/date] Enhanced RDoc (ruby/date#69)

Treats:
    ::_strptime
    ::strptime
Adds 'Related' entry to some methods' doc.

ruby/date@a6c2129273

* [rubygems/rubygems] Warn (rather than crash) when setting `nil` specification versions

rubygems/rubygems@a4ba1a4d97

* [rubygems/rubygems] fix platform matching for index specs

rubygems/rubygems@f087f1b590

* Updated to use multiple licenses

Co-authored-by: Hiroshi SHIBATA <[email protected]>

* [ruby/bigdecimal] Updated to use the correct spec for muilti license

ruby/bigdecimal@13165b29b8

* Merge rubygems/bundler HEAD

  Pick from rubygems/rubygems@8331e63

* [rubygems/rubygems] Fix conservative updates regardless of `--strict`

rubygems/rubygems@c9a1d69a8d

* [rubygems/rubygems] Fix `bundle outdated --strict`

It should be an alias of `--filter-strict`.

`--update-strict` is essentially a dummy option with no special behavior
associated and should be deprecated.

rubygems/rubygems@ec1e5d83c8

* Harden Queue#pop timeout tests

They occasionaly fail with;

```
  FLeaked thread: TestThreadQueue#test_queue_pop_timeout: #<Thread:0x0000000108e38e48 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 sleep>
  .Finished thread: TestThreadQueue#test_deny_pushers: #<Thread:0x0000000108e38e48 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 dead>
  ...
  Retrying...

    1) Failure:
  TestThreadQueue#test_sized_queue_pop_timeout [/Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:157]:
  <#<Thread:0x00000001084bc7e8 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:156 sleep>> expected but was
  <nil>.

    2) Failure:
  TestThreadQueue#test_queue_pop_timeout [/Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:124]:
  <#<Thread:0x00000001083ff058 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 sleep>> expected but was
  <nil>.
```

I'm hoping joining for longer should help avoid this.

* [ruby/irb] shortcut colorize_code to speedup pretty_print

ruby/irb@8a074a6904

* * 2022-08-04 [ci skip]

* [rubygems/rubygems] Extract entry.full_name to a variable

rubygems/rubygems@3973773005

* [rubygems/rubygems] Warn dangling symlinks

rubygems/rubygems@425b78637f

* Link ext bundles with bundle loader option for newer ld64

ld64 shipped with Xcode 14 emits a warning when using `-undefined
dynamic_lookup`.

```
ld: warning: -undefined dynamic_lookup may not work with chained fixups
```

Actually, `-undefined dynamic_lookup` doesn't work when:

1. Link a *shared library* with the option
2. Link it with a program that uses the chained-fixup introduced from
   macOS 12 and iOS 15
because `-undefined dynamic_lookup` uses lazy-bindings and they won't be
bound while dyld fixes-up by traversing chained-fixup info.

However, we build exts as *bundles* and they are loaded only through
`dlopen`, so it's safe to use `-undefined dynamic_lookup` in theory.
So the warning produced by ld64 is false-positive, and it results
failure of option checking in configuration. Therefore, it would be an
option to ignore the warning during our configuration.

On the other hand, `-undefined dynamic_lookup` is already deprecated on
all darwin platforms except for macOS, so it's good time to get rid of
the option. ld64 also provides `-bundle_loader <executable>` option,
which allows to resolve symbols defined in the executable symtab while
linking. It behaves almost the same with `-undefined dynamic_lookup`,
but it makes the following changes:

1. Require that unresolved symbols among input objects must be defined
   in the executable.
2. Lazy symbol binding will lookup only the symtab of the bundle loader
   executable. (`-undefined dynamic_lookup` lookups all symtab as flat
   namespace)

This patch adds `-bundle_loader $(RUBY)` when non-EXTSTATIC
configuration by assuming ruby executable can be linked before building
exts.

See "New Features" subsection under "Linking" section for chained fixup
https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes

* Quote $(BUILTRUBY) so paths with spaces work

* Use $(bindir) for path to executable in mkmf

For the macOS -bundle_loader linker option, we need a path to the
Ruby exectuable. $(RUBY) is not necessarily a path since it could
be a command line invocation. That happens during build with
runruby.rb and can happen post installation if the user passes
the --ruby option to a extconf.rb. Use $(bindir) to locate
the executable instead.

Before installation, $(bindir) doesn't exist, so we need to be
able to override $(BUILTRUBY) in such situations so test-spec
and bundled extensions could build. Use a new mkmf global,
$builtruby, to do this; set it in fake.rb and in extmk.rb.

Our build system is quite complex...

* Resolve abi symbol references from miniruby to avoid circular deps

Adding `ruby` to `PREP` causes the following circular dependencies
because `PREP` is used as a prerequisite by some targets required to
build `ruby` target itself.
```
make: Circular .rbconfig.time <- ruby dependency dropped.
make: Circular builtin_binary.inc <- ruby dependency dropped.
make: Circular ext/extinit.c <- ruby dependency dropped.
make: Circular ruby <- ruby dependency dropped.
```

Adding a new Make variable like `EXTPREP` only for exts may be also
reasonable, but it would introduce another complexity into our build
system. `-bundle_loader` doesn't care that link-time and run-time
loader executables are different as long as bound symbols are provided,
so it's ok to resolve from miniruby to simplify our build.

* Resolve abi symbols from libruby.dylib when available

* Add `-bundle_loader` to mjit compilation args on macOS

* thread_sync.c: pass proper argument to queue_sleep in rb_szqueue_push

When I removed the SizeQueue#push timeout from my PR, I forgot to
update the `queue_sleep` parameters to be a `queue_sleep_arg`.

Somehow this worked on most archs, but on Solaris/Sparc it would
legitimately crash when trying to access the `timeout` and `end`
members of the struct.

* [rubygems/rubygems] Fix unused variable warning

```
/Users/deivid/Code/rubygems/rubygems/test/rubygems/test_gem_resolver_installer_set.rb:55: warning: assigned but unused variable - a_1_local
```

rubygems/rubygems@9ea4534800

* * 2022-08-05 [ci skip]

* YJIT: Add known_* helpers for Type (ruby#6208)

* YJIT: Add known_* helpers for Type

This adds a few helpers to Type which all return Options representing
what is known, from a Ruby perspective, about the type.

This includes:
* known_class_of: If known, the class represented by this type
* known_value_type: If known, the T_ value type
* known_exact_value: If known, the exact VALUE represented by this type
  (currently this is only available for true/false/nil)
* known_truthy: If known, whether or not this value evaluates as true
  (not false or nil)

The goal of this is to abstract away the specifics of the mappings
between types wherever possible from the codegen. For example previously
by introducing Type::CString as a more specific version of
Type::TString, uses of Type::TString in codegen needed to be updated to
check either case. Now by using known_value_type, at least in theory we
can introduce new types with minimal (if any) codegen changes.

I think rust's Option type allows us to represent this uncertainty
fairly well, and should help avoid mistakes, and the matching using this
turned out pretty cleanly.

* YJIT: Use known_value_type for checktype

* YJIT: Use known_value_type for T_STRING check

* YJIT: Use known_class_of in guard_known_klass

* YJIT: Use known truthyness in jit_rb_obj_not

* YJIT: Rename known_class_of => known_class

* YJIT: Allow str-concat arg to be any string subtype, not just rb_cString (ruby#6205)

Allow str-concat arg to be any string subtype, not just rb_cString

Co-authored-by: Jemma Issroff <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Burdette Lamar <[email protected]>
Co-authored-by: Peter Zhu <[email protected]>
Co-authored-by: git <[email protected]>
Co-authored-by: Ivo Anjo <[email protected]>
Co-authored-by: Hiroshi SHIBATA <[email protected]>
Co-authored-by: Kevin Menard <[email protected]>
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Co-authored-by: David Rodríguez <[email protected]>
Co-authored-by: moe <[email protected]>
Co-authored-by: Matt Valentine-House <[email protected]>
Co-authored-by: Benoit Daloze <[email protected]>
Co-authored-by: Jeremy Evans <[email protected]>
Co-authored-by: Takashi Kokubun <[email protected]>
Co-authored-by: Matthew Draper <[email protected]>
Co-authored-by: John Hawthorn <[email protected]>
Co-authored-by: Takuya Noguchi <[email protected]>
Co-authored-by: konsolebox <[email protected]>
Co-authored-by: Luka Dornhecker <[email protected]>
Co-authored-by: Jean Boussier <[email protected]>
Co-authored-by: Ethan <[email protected]>
Co-authored-by: Akinori MUSHA <[email protected]>
Co-authored-by: Wolf <[email protected]>
Co-authored-by: Kazuhiro NISHIYAMA <[email protected]>
Co-authored-by: Koichi Sasada <[email protected]>
Co-authored-by: Ian Ker-Seymer <[email protected]>
Co-authored-by: Aaron Patterson <[email protected]>
Co-authored-by: Ilya Dyakonov <[email protected]>
Co-authored-by: Thomas Winsnes <[email protected]>
Co-authored-by: tompng <[email protected]>
Co-authored-by: Yuta Saito <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
Co-authored-by: Noah Gibbs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants