Skip to content

Commit 20601f4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix_str_encode_in_ractors
2 parents ab982ce + 07878eb commit 20601f4

98 files changed

Lines changed: 2545 additions & 1077 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup/directories/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ runs:
9393
path: ${{ inputs.srcdir }}
9494
fetch-depth: ${{ inputs.fetch-depth }}
9595

96-
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
96+
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
9797
with:
9898
path: ${{ inputs.srcdir }}/.downloaded-cache
9999
key: ${{ runner.os }}-${{ runner.arch }}-downloaded-cache

.github/workflows/compilers.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
108108
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
109109
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
110+
- { uses: './.github/actions/compilers', name: 'clang 22', with: { tag: 'clang-22' } }
110111
- { uses: './.github/actions/compilers', name: 'clang 21', with: { tag: 'clang-21' } }
111112
- { uses: './.github/actions/compilers', name: 'clang 20', with: { tag: 'clang-20' } }
112113
- { uses: './.github/actions/compilers', name: 'clang 19', with: { tag: 'clang-19' } }

.github/workflows/mingw.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,38 @@ jobs:
7070
with:
7171
ruby-version: '3.2'
7272

73+
- name: Remove Strawberry Perl pkg-config
74+
working-directory:
75+
# `pkg-config.bat` included in Strawberry Perl is written in
76+
# Perl and doesn't work when another msys2 `perl` precede its
77+
# own `perl`.
78+
#
79+
# ```
80+
# Can't find C:\Strawberry\perl\bin\pkg-config.bat on PATH, '.' not in PATH.
81+
# ```
82+
run: |
83+
Get-Command pkg-config.bat | % { ren $_.path ($_.path + "~") }
84+
shell: pwsh
85+
7386
- name: Misc system & package info
7487
working-directory:
7588
run: |
7689
# show where
7790
result=true
7891
for e in gcc.exe ragel.exe make.exe libcrypto-3-x64.dll libssl-3-x64.dll; do
79-
echo ::group::$'\033[93m'$e$'\033[m'
92+
echo ::group::$'\e[93m'$e$'\e[m'
8093
where $e || result=false
8194
echo ::endgroup::
8295
done
8396
# show version
8497
for e in gcc ragel make "openssl version"; do
8598
case "$e" in *" "*) ;; *) e="$e --version";; esac
86-
echo ::group::$'\033[93m'$e$'\033[m'
99+
echo ::group::$'\e[93m'$e$'\e[m'
87100
$e || result=false
88101
echo ::endgroup::
89102
done
90103
# show packages
91-
echo ::group::$'\033[93m'Packages$'\033[m'
104+
echo ::group::$'\e[93m'Packages$'\e[m'
92105
pacman -Qs mingw-w64-ucrt-x86_64-* | sed -n "s,local/mingw-w64-ucrt-x86_64-,,p"
93106
echo ::endgroup::
94107
$result

ast.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,11 @@ node_locations(VALUE ast_value, const NODE *node)
866866
location_new(&RNODE_IF(node)->if_keyword_loc),
867867
location_new(&RNODE_IF(node)->then_keyword_loc),
868868
location_new(&RNODE_IF(node)->end_keyword_loc));
869+
case NODE_MODULE:
870+
return rb_ary_new_from_args(3,
871+
location_new(nd_code_loc(node)),
872+
location_new(&RNODE_MODULE(node)->module_keyword_loc),
873+
location_new(&RNODE_MODULE(node)->end_keyword_loc));
869874
case NODE_NEXT:
870875
return rb_ary_new_from_args(2,
871876
location_new(nd_code_loc(node)),

autogen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ case "$0" in
1010
* ) srcdir="";; # Otherwise
1111
esac
1212

13-
# If install-only is explicitly requested, disbale symlink flags
13+
# If install-only is explicitly requested, disable symlink flags
1414
case " $* " in
1515
*" -i "* | *" --install"* ) symlink_flags="" ;;
1616
* ) symlink_flags="--install --symlink" ;;

benchmark/struct_accessor.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
prelude: |
22
C = Struct.new(:x) do
3+
def initialize(...)
4+
super
5+
@ivar = 42
6+
end
7+
8+
attr_accessor :ivar
9+
310
class_eval <<-END
411
def r
512
#{'x;'*256}
@@ -15,11 +22,16 @@ prelude: |
1522
m = method(:x=)
1623
#{'m.call(nil);'*256}
1724
end
25+
def r_ivar
26+
#{'ivar;'*256}
27+
end
1828
END
1929
end
30+
C.new(nil) # ensure common shape is known
2031
obj = C.new(nil)
2132
benchmark:
2233
member_reader: "obj.r"
2334
member_writer: "obj.w"
2435
member_reader_method: "obj.rm"
2536
member_writer_method: "obj.wm"
37+
ivar_reader: "obj.r_ivar"

depend

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6065,6 +6065,7 @@ hash.$(OBJEXT): $(top_srcdir)/internal/set_table.h
60656065
hash.$(OBJEXT): $(top_srcdir)/internal/st.h
60666066
hash.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
60676067
hash.$(OBJEXT): $(top_srcdir)/internal/string.h
6068+
hash.$(OBJEXT): $(top_srcdir)/internal/struct.h
60686069
hash.$(OBJEXT): $(top_srcdir)/internal/symbol.h
60696070
hash.$(OBJEXT): $(top_srcdir)/internal/thread.h
60706071
hash.$(OBJEXT): $(top_srcdir)/internal/time.h
@@ -6288,6 +6289,7 @@ hash.$(OBJEXT): {$(VPATH)}symbol.h
62886289
hash.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
62896290
hash.$(OBJEXT): {$(VPATH)}thread_native.h
62906291
hash.$(OBJEXT): {$(VPATH)}util.h
6292+
hash.$(OBJEXT): {$(VPATH)}variable.h
62916293
hash.$(OBJEXT): {$(VPATH)}vm_core.h
62926294
hash.$(OBJEXT): {$(VPATH)}vm_debug.h
62936295
hash.$(OBJEXT): {$(VPATH)}vm_opts.h
@@ -12700,6 +12702,7 @@ ractor.$(OBJEXT): {$(VPATH)}vm_debug.h
1270012702
ractor.$(OBJEXT): {$(VPATH)}vm_opts.h
1270112703
ractor.$(OBJEXT): {$(VPATH)}vm_sync.h
1270212704
ractor.$(OBJEXT): {$(VPATH)}yjit.h
12705+
ractor.$(OBJEXT): {$(VPATH)}zjit.h
1270312706
random.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
1270412707
random.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
1270512708
random.$(OBJEXT): $(CCAN_DIR)/list/list.h
@@ -12926,6 +12929,7 @@ range.$(OBJEXT): $(top_srcdir)/internal/enumerator.h
1292612929
range.$(OBJEXT): $(top_srcdir)/internal/error.h
1292712930
range.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
1292812931
range.$(OBJEXT): $(top_srcdir)/internal/gc.h
12932+
range.$(OBJEXT): $(top_srcdir)/internal/imemo.h
1292912933
range.$(OBJEXT): $(top_srcdir)/internal/numeric.h
1293012934
range.$(OBJEXT): $(top_srcdir)/internal/range.h
1293112935
range.$(OBJEXT): $(top_srcdir)/internal/serial.h
@@ -12948,6 +12952,7 @@ range.$(OBJEXT): {$(VPATH)}config.h
1294812952
range.$(OBJEXT): {$(VPATH)}defines.h
1294912953
range.$(OBJEXT): {$(VPATH)}encoding.h
1295012954
range.$(OBJEXT): {$(VPATH)}id.h
12955+
range.$(OBJEXT): {$(VPATH)}id_table.h
1295112956
range.$(OBJEXT): {$(VPATH)}intern.h
1295212957
range.$(OBJEXT): {$(VPATH)}internal.h
1295312958
range.$(OBJEXT): {$(VPATH)}internal/abi.h
@@ -15580,6 +15585,7 @@ shape.$(OBJEXT): $(top_srcdir)/internal/serial.h
1558015585
shape.$(OBJEXT): $(top_srcdir)/internal/set_table.h
1558115586
shape.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
1558215587
shape.$(OBJEXT): $(top_srcdir)/internal/string.h
15588+
shape.$(OBJEXT): $(top_srcdir)/internal/struct.h
1558315589
shape.$(OBJEXT): $(top_srcdir)/internal/symbol.h
1558415590
shape.$(OBJEXT): $(top_srcdir)/internal/variable.h
1558515591
shape.$(OBJEXT): $(top_srcdir)/internal/vm.h
@@ -16569,6 +16575,7 @@ string.$(OBJEXT): $(top_srcdir)/internal/serial.h
1656916575
string.$(OBJEXT): $(top_srcdir)/internal/set_table.h
1657016576
string.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
1657116577
string.$(OBJEXT): $(top_srcdir)/internal/string.h
16578+
string.$(OBJEXT): $(top_srcdir)/internal/struct.h
1657216579
string.$(OBJEXT): $(top_srcdir)/internal/transcode.h
1657316580
string.$(OBJEXT): $(top_srcdir)/internal/variable.h
1657416581
string.$(OBJEXT): $(top_srcdir)/internal/vm.h
@@ -16766,6 +16773,7 @@ string.$(OBJEXT): {$(VPATH)}thread.h
1676616773
string.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
1676716774
string.$(OBJEXT): {$(VPATH)}thread_native.h
1676816775
string.$(OBJEXT): {$(VPATH)}util.h
16776+
string.$(OBJEXT): {$(VPATH)}variable.h
1676916777
string.$(OBJEXT): {$(VPATH)}vm_core.h
1677016778
string.$(OBJEXT): {$(VPATH)}vm_debug.h
1677116779
string.$(OBJEXT): {$(VPATH)}vm_opts.h
@@ -18105,6 +18113,7 @@ variable.$(OBJEXT): $(top_srcdir)/internal/serial.h
1810518113
variable.$(OBJEXT): $(top_srcdir)/internal/set_table.h
1810618114
variable.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
1810718115
variable.$(OBJEXT): $(top_srcdir)/internal/string.h
18116+
variable.$(OBJEXT): $(top_srcdir)/internal/struct.h
1810818117
variable.$(OBJEXT): $(top_srcdir)/internal/symbol.h
1810918118
variable.$(OBJEXT): $(top_srcdir)/internal/thread.h
1811018119
variable.$(OBJEXT): $(top_srcdir)/internal/variable.h

doc/string/grapheme_clusters.rdoc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
Returns an array of the grapheme clusters in +self+
22
(see {Unicode Grapheme Cluster Boundaries}[https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries]):
33

4-
s = "\u0061\u0308-pqr-\u0062\u0308-xyz-\u0063\u0308" # => "ä-pqr-b̈-xyz-c̈"
4+
s = "ä-pqr-b̈-xyz-c̈"
5+
s.size # => 16
6+
s.bytesize # => 19
7+
s.grapheme_clusters.size # => 13
58
s.grapheme_clusters
69
# => ["ä", "-", "p", "q", "r", "-", "b̈", "-", "x", "y", "z", "-", "c̈"]
10+
11+
Details:
12+
13+
s = "ä"
14+
s.grapheme_clusters # => ["ä"] # One grapheme cluster.
15+
s.bytes # => [97, 204, 136] # Three bytes.
16+
s.chars # => ["a", "̈"] # Two characters.
17+
s.chars.map {|char| char.ord } # => [97, 776] # Their values.
18+
19+
Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].

0 commit comments

Comments
 (0)