Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dev/gc-mmtk
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 committed Oct 10, 2024
2 parents f4cb3c2 + 3d8fe46 commit ff9adf2
Show file tree
Hide file tree
Showing 181 changed files with 70,021 additions and 1,614 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup/directories/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ runs:
git config --global init.defaultBranch garbage
- if: inputs.checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
path: ${{ inputs.srcdir }}
fetch-depth: ${{ inputs.fetch-depth }}

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: ${{ inputs.srcdir }}/.downloaded-cache
key: downloaded-cache
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/bundled_gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
- name: Download previous gems list
run: |
data=bundled_gems.json
mkdir -p .downloaded-cache
ln -s .downloaded-cache/$data .
curl -O -R -z ./$data https://stdgems.org/$data
for data in bundled_gems.json default_gems.json; do
ln -s .downloaded-cache/$data .
curl -O -R -z ./$data https://stdgems.org/$data
done
- name: Update bundled gems list
id: bundled_gems
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/check_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,29 @@ jobs:
steps.diff.outputs.update
}}
- name: Generate docs
id: docs
run: |
ruby -W0 --disable-gems -I./lib tool/rdoc-srcdir -q --op html .
echo htmlout=ruby-html-${GITHUB_SHA:0:10} >> $GITHUB_OUTPUT
# Generate only when document commit/PR
if: >-
${{false
|| contains(github.event.head_commit.message, '[ruby/rdoc]')
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
}}
- name: Upload docs
uses: actions/upload-artifact@v4
with:
path: html
name: ${{ steps.docs.outputs.htmlout }}
if: ${{ steps.docs.outcome == 'success' }}

- uses: ./.github/actions/slack
with:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ jobs:
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb

- name: Initialize CodeQL
uses: github/codeql-action/init@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
uses: github/codeql-action/autobuild@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
category: '/language:${{ matrix.language }}'
upload: False
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
continue-on-error: true

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif
continue-on-error: true
1 change: 0 additions & 1 deletion .github/workflows/parsey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:

- name: make ${{ matrix.test_task }}
run: make -s ${{ matrix.test_task }} RUN_OPTS="$RUN_OPTS" SPECOPTS="$SPECOPTS"
timeout-minutes: ${{ matrix.timeout }}
env:
RUBY_TESTOPTS: ${{ matrix.testopts }}
EXCLUDES: '../src/test/.excludes-parsey'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- run: tar cfz ../install.tar.gz -C ../install .

- name: Upload artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: ruby-wasm-install
path: ${{ github.workspace }}/install.tar.gz
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
- name: Save Pull Request number
if: ${{ github.event_name == 'pull_request' }}
run: echo "${{ github.event.pull_request.number }}" >> ${{ github.workspace }}/github-pr-info.txt
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
if: ${{ github.event_name == 'pull_request' }}
with:
name: github-pr-info
Expand Down
88 changes: 55 additions & 33 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Note that each entry is kept to a minimum, see links for details.
* Keyword arguments are no longer allowed in index assignment
(e.g. `a[0, kw: 1] = 2`). [[Bug #20218]]

* `GC.config` added to allow setting configuration variables on the Garbage
* GC.config added to allow setting configuration variables on the Garbage
Collector. [[Feature #20443]]

* GC configuration parameter `rgengc_allow_full_mark` introduced. When `false`
Expand All @@ -37,35 +37,44 @@ Note: We're only listing outstanding class updates.

* Exception

* Exception#set_backtrace now accepts arrays of `Thread::Backtrace::Location`.
`Kernel#raise`, `Thread#raise` and `Fiber#raise` also accept this new format. [[Feature #13557]]
* Exception#set_backtrace now accepts arrays of Thread::Backtrace::Location.
Kernel#raise, Thread#raise and Fiber#raise also accept this new format. [[Feature #13557]]

* Range

* Range#size now raises TypeError if the range is not iterable. [[Misc #18984]]
* Range#step now consistently has a semantics of iterating by using `+` operator
for all types, not only numerics. [[Feature #18368]]
* Range#size now raises TypeError if the range is not iterable. [[Misc #18984]]
* Range#step now consistently has a semantics of iterating by using `+` operator
for all types, not only numerics. [[Feature #18368]]

```ruby
(Time.utc(2022, 2, 24)..).step(24*60*60).take(3)
#=> [2022-02-24 00:00:00 UTC, 2022-02-25 00:00:00 UTC, 2022-02-26 00:00:00 UTC]
```
```ruby
(Time.utc(2022, 2, 24)..).step(24*60*60).take(3)
#=> [2022-02-24 00:00:00 UTC, 2022-02-25 00:00:00 UTC, 2022-02-26 00:00:00 UTC]
```

* RubyVM::AbstractSyntaxTree

* Add `RubyVM::AbstractSyntaxTree::Node#locations` method which returns location objects
associated with the AST node. [[Feature #20624]]
* Add `RubyVM::AbstractSyntaxTree::Location` class which holds location information. [[Feature #20624]]
* Add RubyVM::AbstractSyntaxTree::Node#locations method which returns location objects
associated with the AST node. [[Feature #20624]]
* Add RubyVM::AbstractSyntaxTree::Location class which holds location information. [[Feature #20624]]

## Stdlib updates

The following default gem is added.

* win32-registry 0.0.1

* Tempfile

* The keyword argument `anonymous: true` is implemented for `Tempfile.create`.
* The keyword argument `anonymous: true` is implemented for Tempfile.create.
`Tempfile.create(anonymous: true)` removes the created temporary file immediately.
So applications don't need to remove the file.
[[Feature #20497]]
* win32/sspi.rb
* This library is now extracted from the Ruby repository to [ruby/net-http-sspi].
[[Feature #20775]]
The following default gems are updated.
* RubyGems 3.6.0.dev
Expand Down Expand Up @@ -119,31 +128,43 @@ The following bundled gems are promoted from default gems.
* nkf 0.2.0
* syslog 0.1.2
* csv 3.3.0
The following bundled gem is added.
* repl_type_completor 0.1.7
See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/logger/releases) or changelog for details of the default gems or bundled gems.
See GitHub releases like [GitHub Releases of Logger] or changelog for
details of the default gems or bundled gems.
[ruby/net-http-sspi]: https://github.com/ruby/net-http-sspi
[GitHub Releases of Logger]: https://github.com/ruby/logger/releases
## Supported platforms
## Compatibility issues
* Error messages and backtrace displays have been changed.
* Use a single quote instead of a backtick as a opening quote. [[Feature #16495]]
* Display a class name before a method name (only when the class has a permanent name). [[Feature #19117]]
* `Kernel#caller`, `Thread::Backtrace::Location`'s methods, etc. are also changed accordingly.
```
Old:
test.rb:1:in `foo': undefined method `time' for an instance of Integer
from test.rb:2:in `<main>'

New:
test.rb:1:in 'Object#foo': undefined method 'time' for an instance of Integer
from test.rb:2:in `<main>'
```
* `Hash#inspect` rendering have been changed. [[Bug #20433]]
* Symbol keys are displayed using the modern symbol key syntax: `"{user: 1}"`
* Other keys now have spaces around `=>`: `'{"user" => 1}'`, while previously they didn't: `'{"user"=>1}'`
* Use a single quote instead of a backtick as an opening quote. [[Feature #16495]]
* Display a class name before a method name (only when the class has a permanent name). [[Feature #19117]]
* Kernel#caller, Thread::Backtrace::Location’s methods, etc. are also changed accordingly.
Old:
```
test.rb:1:in `foo': undefined method `time' for an instance of Integer
from test.rb:2:in `<main>'
```
New:
```
test.rb:1:in 'Object#foo': undefined method 'time' for an instance of Integer
from test.rb:2:in '<main>'
```

* Hash#inspect rendering have been changed. [[Bug #20433]]

* Symbol keys are displayed using the modern symbol key syntax: `"{user: 1}"`
* Other keys now have spaces around `=>`: `'{"user" => 1}'`, while previously they didn't: `'{"user"=>1}'`
## Stdlib compatibility issues
Expand All @@ -154,7 +175,7 @@ See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/log
## Implementation improvements
* `Array#each` is rewritten in Ruby for better performance [[Feature #20182]].
* Array#each is rewritten in Ruby for better performance [[Feature #20182]].
## JIT
Expand All @@ -165,7 +186,7 @@ See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/log
[[Feature #15554]]

* Redefining some core methods that are specially optimized by the interpreter
and JIT like `String.freeze` or `Integer#+` now emits a performance class
and JIT like String#freeze or Integer#+ now emits a performance class
warning (`-W:performance` or `Warning[:performance] = true`).
[[Feature #20429]]

Expand All @@ -188,3 +209,4 @@ See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/log
[Feature #20443]: https://bugs.ruby-lang.org/issues/20443
[Feature #20497]: https://bugs.ruby-lang.org/issues/20497
[Feature #20624]: https://bugs.ruby-lang.org/issues/20624
[Feature #20775]: https://bugs.ruby-lang.org/issues/20775
Loading

0 comments on commit ff9adf2

Please sign in to comment.