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
5 changes: 5 additions & 0 deletions .github/workflows/bundled_gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
with:
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}

- uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
with:
ruby-version: 4.0

- uses: ./.github/actions/setup/directories
with:
# Skip overwriting MATZBOT_AUTO_UPDATE_TOKEN
Expand Down Expand Up @@ -72,6 +76,7 @@ jobs:
- name: Maintain updated gems list in NEWS
run: |
ruby tool/update-NEWS-gemlist.rb bundled
ruby tool/update-NEWS-github-release.rb --update
if: ${{ env.UPDATE_ENABLED == 'true' }}

- name: Check diffs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
}}

- name: Upload docs
uses: actions/upload-artifact@v6.0.0
uses: actions/upload-artifact@v7.0.0
with:
path: html
name: ${{ steps.docs.outputs.htmlout }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: SARIF file
path: results.sarif
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
- run: tar cfz ../install.tar.gz -C ../install .

- name: Upload artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ruby-wasm-install
path: ${{ github.workspace }}/install.tar.gz
Expand Down Expand Up @@ -168,7 +168,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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: ${{ github.event_name == 'pull_request' }}
with:
name: github-pr-info
Expand Down
45 changes: 45 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,47 @@ releases.
* RubyGems 4.1.0.dev
* bundler 4.1.0.dev
* json 2.18.1
* 2.18.0 to [v2.18.1][json-v2.18.1]
* openssl 4.0.1
* 4.0.0 to [v4.0.1][openssl-v4.0.1]
* prism 1.9.0
* 1.8.0 to [v1.9.0][prism-v1.9.0]
* resolv 0.7.1
* 0.7.0 to [v0.7.1][resolv-v0.7.1]
* stringio 3.2.1.dev
* strscan 3.1.7.dev
* 3.1.6 to [v3.1.7][strscan-v3.1.7]
* syntax_suggest 2.0.3

### The following bundled gems are updated.

* minitest 6.0.2
* test-unit 3.7.7
* 3.7.3 to [3.7.4][test-unit-3.7.4], [3.7.5][test-unit-3.7.5], [3.7.6][test-unit-3.7.6], [3.7.7][test-unit-3.7.7]
* rss 0.3.2
* 0.3.1 to [0.3.2][rss-0.3.2]
* net-imap 0.6.3
* 0.6.1 to [v0.6.2][net-imap-v0.6.2], [v0.6.3][net-imap-v0.6.3]
* rbs 3.10.3
* 3.10.0 to [v3.10.1][rbs-v3.10.1], [v3.10.2][rbs-v3.10.2], [v3.10.3][rbs-v3.10.3]
* typeprof 0.31.1
* debug 1.11.1
* 1.11.0 to [v1.11.1][debug-v1.11.1]
* mutex_m 0.3.0
* resolv-replace 0.2.0
* 0.1.1 to [v0.2.0][resolv-replace-v0.2.0]
* syslog 0.4.0
* 0.3.0 to [v0.4.0][syslog-v0.4.0]
* repl_type_completor 0.1.13
* 0.1.12 to [v0.1.13][repl_type_completor-v0.1.13]
* pstore 0.2.1
* 0.2.0 to [v0.2.1][pstore-v0.2.1]
* rdoc 7.2.0
* 6.17.0 to [v7.0.0][rdoc-v7.0.0], [v7.0.1][rdoc-v7.0.1], [v7.0.2][rdoc-v7.0.2], [v7.0.3][rdoc-v7.0.3], [v7.1.0][rdoc-v7.1.0], [v7.2.0][rdoc-v7.2.0]
* win32ole 1.9.3
* 1.9.2 to [v1.9.3][win32ole-v1.9.3]
* irb 1.17.0
* 1.16.0 to [v1.17.0][irb-v1.17.0]

### RubyGems and Bundler

Expand All @@ -108,3 +125,31 @@ A lot of work has gone into making Ractors more stable, performant, and usable.
[Feature #15330]: https://bugs.ruby-lang.org/issues/15330
[Feature #21390]: https://bugs.ruby-lang.org/issues/21390
[Feature #21785]: https://bugs.ruby-lang.org/issues/21785
[json-v2.18.1]: https://github.com/ruby/json/releases/tag/v2.18.1
[openssl-v4.0.1]: https://github.com/ruby/openssl/releases/tag/v4.0.1
[prism-v1.9.0]: https://github.com/ruby/prism/releases/tag/v1.9.0
[resolv-v0.7.1]: https://github.com/ruby/resolv/releases/tag/v0.7.1
[strscan-v3.1.7]: https://github.com/ruby/strscan/releases/tag/v3.1.7
[test-unit-3.7.4]: https://github.com/test-unit/test-unit/releases/tag/3.7.4
[test-unit-3.7.5]: https://github.com/test-unit/test-unit/releases/tag/3.7.5
[test-unit-3.7.6]: https://github.com/test-unit/test-unit/releases/tag/3.7.6
[test-unit-3.7.7]: https://github.com/test-unit/test-unit/releases/tag/3.7.7
[rss-0.3.2]: https://github.com/ruby/rss/releases/tag/0.3.2
[net-imap-v0.6.2]: https://github.com/ruby/net-imap/releases/tag/v0.6.2
[net-imap-v0.6.3]: https://github.com/ruby/net-imap/releases/tag/v0.6.3
[rbs-v3.10.1]: https://github.com/ruby/rbs/releases/tag/v3.10.1
[rbs-v3.10.2]: https://github.com/ruby/rbs/releases/tag/v3.10.2
[rbs-v3.10.3]: https://github.com/ruby/rbs/releases/tag/v3.10.3
[debug-v1.11.1]: https://github.com/ruby/debug/releases/tag/v1.11.1
[resolv-replace-v0.2.0]: https://github.com/ruby/resolv-replace/releases/tag/v0.2.0
[syslog-v0.4.0]: https://github.com/ruby/syslog/releases/tag/v0.4.0
[repl_type_completor-v0.1.13]: https://github.com/ruby/repl_type_completor/releases/tag/v0.1.13
[pstore-v0.2.1]: https://github.com/ruby/pstore/releases/tag/v0.2.1
[rdoc-v7.0.0]: https://github.com/ruby/rdoc/releases/tag/v7.0.0
[rdoc-v7.0.1]: https://github.com/ruby/rdoc/releases/tag/v7.0.1
[rdoc-v7.0.2]: https://github.com/ruby/rdoc/releases/tag/v7.0.2
[rdoc-v7.0.3]: https://github.com/ruby/rdoc/releases/tag/v7.0.3
[rdoc-v7.1.0]: https://github.com/ruby/rdoc/releases/tag/v7.1.0
[rdoc-v7.2.0]: https://github.com/ruby/rdoc/releases/tag/v7.2.0
[win32ole-v1.9.3]: https://github.com/ruby/win32ole/releases/tag/v1.9.3
[irb-v1.17.0]: https://github.com/ruby/irb/releases/tag/v1.17.0
4 changes: 4 additions & 0 deletions box.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "ruby/util.h"
#include "vm_core.h"
#include "darray.h"
#include "zjit.h"

#include <stdio.h>

Expand Down Expand Up @@ -390,6 +391,9 @@ box_initialize(VALUE box_value)

rb_ivar_set(box_value, id_box_entry, entry);

// Invalidate ZJIT code that assumes only the root box is active
rb_zjit_invalidate_root_box();

return box_value;
}

Expand Down
1 change: 1 addition & 0 deletions depend
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ box.$(OBJEXT): {$(VPATH)}vm_core.h
box.$(OBJEXT): {$(VPATH)}vm_debug.h
box.$(OBJEXT): {$(VPATH)}vm_opts.h
box.$(OBJEXT): {$(VPATH)}vm_sync.h
box.$(OBJEXT): {$(VPATH)}zjit.h
builtin.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
builtin.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
builtin.$(OBJEXT): $(CCAN_DIR)/list/list.h
Expand Down
12 changes: 12 additions & 0 deletions jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@
#include "vm_sync.h"
#include "internal/fixnum.h"
#include "internal/string.h"
#include "internal/class.h"
#include "internal/imemo.h"

enum jit_bindgen_constants {
// Field offsets for the RObject struct
ROBJECT_OFFSET_AS_HEAP_FIELDS = offsetof(struct RObject, as.heap.fields),
ROBJECT_OFFSET_AS_ARY = offsetof(struct RObject, as.ary),

// Field offset for prime classext's fields_obj from a class pointer
RCLASS_OFFSET_PRIME_FIELDS_OBJ = offsetof(struct RClass_and_rb_classext_t, classext.fields_obj),

// Field offsets for the RString struct
RUBY_OFFSET_RSTRING_LEN = offsetof(struct RString, len),

Expand Down Expand Up @@ -529,6 +534,13 @@ rb_jit_multi_ractor_p(void)
return rb_multi_ractor_p();
}

bool
rb_jit_class_fields_embedded_p(VALUE klass)
{
VALUE fields_obj = RCLASS_EXT_PRIME(klass)->fields_obj;
return !fields_obj || !FL_TEST_RAW(fields_obj, OBJ_FIELD_HEAP);
}

// Acquire the VM lock and then signal all other Ruby threads (ractors) to
// contend for the VM lock, putting them to sleep. ZJIT and YJIT use this to
// evict threads running inside generated code so among other things, it can
Expand Down
26 changes: 21 additions & 5 deletions tool/update-NEWS-gemlist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,29 @@
prevs = [prev, prev.sub(/\.\d+\z/, '')]

update = ->(list, type, desc = "updated") do
item = ->(mark = "* ") do
item = ->(mark = "* ", sub_bullets = {}) do
"### The following #{type} gem#{list.size == 1 ? ' is' : 's are'} #{desc}.\n\n" +
list.map {|g, v|"#{mark}#{g} #{v}\n"}.join("") + "\n"
list.map {|g, v|
s = "#{mark}#{g} #{v}\n"
s += sub_bullets[g].join("") if sub_bullets[g]
s
}.join("") + "\n"
end
news.sub!(/^(?:\*( +)|#+ *)?The following #{type} gems? (?:are|is) #{desc}\.\n+(?:(?(1) \1)\*( *).*\n)*\n*/) do
item["#{$1&.<< " "}*#{$2 || ' '}"]
end or news.sub!(/^## Stdlib updates(?:\n+The following.*(?:\n+( *\* *).*)*)*\n+\K/) do
news.sub!(/^(?:\*( +)|#+ *)?The following #{type} gems? (?:are|is) #{desc}\.\n+(?:(?:(?(1) \1)\*( *).*\n)(?:[ \t]+\*.*\n)*)*\n*/) do
mark = "#{$1&.dup&.<< " "}*#{$2 || ' '}"
# Parse existing sub-bullets from matched section
sb = {}; cg = nil
$~.to_s.each_line do |l|
if l =~ /^\* ([A-Za-z0-9_\-]+)\s/
cg = $1
elsif cg && l =~ /^\s+\*/
(sb[cg] ||= []) << l
else
cg = nil
end
end
item[mark, sb]
end or news.sub!(/^## Stdlib updates(?:\n+The following.*(?:\n+(?:( *\* *).*|[ \t]+\*.*))*)* *\n+\K/) do
item[$1 || "* "]
end
end
Expand Down
Loading