Skip to content

Commit e8f6092

Browse files
maximecbjeremyevansmatzbotnobuaycabta
authored
Merge upstream (ruby#56)
* Remove extra word in heredoc documentation From Thibault Jouan Fixes [Misc #17872] * * 2021-05-21 [ci skip] * [DOC] Moved `File.fnmatch?` to dir.rb So that no longer disturbed by C comment delimiters. * Remove short options with argument [Bug #17870] Remove GNU make `-O` and `-W` options which are short but followed by an argument, so that `$mflags.set?(?n)` does not return `true` wrongly. * [ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799 ruby/rdoc@a7f5d6ab88 * [ruby/rdoc] Version 6.3.1 ruby/rdoc@9307f932b7 * [ruby/rdoc] Update rdoc.gemspec by adding lib/rdoc/markup/table.rb Fixes ruby/rdoc#808 ruby/rdoc@80766fd389 * [ruby/rdoc] Dir.children is 2.5+ RDoc seems still supporting outdated 2.4. https://github.com/ruby/rdoc/runs/2565344070?check_suite_focus=true#step:5:64 ``` Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): NoMethodError: undefined method `children' for Dir:Class /home/runner/work/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:467:in `block in test_remove_unparseable_CVE_2021_31799' 464: end 465: 466: assert_equal file_list, @rdoc.remove_unparseable(file_list) => 467: assert_equal file_list, Dir.children('.') 468: end 469: end 470: ``` ruby/rdoc@5a4a64dc0f * [ruby/rdoc] Vertical-bar is disallowed in path names on Windows No risk of remote code execution, when the file cannot be created. https://github.com/ruby/rdoc/runs/2565343916?check_suite_focus=true#step:5:58 ``` Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): Errno::EINVAL: Invalid argument @ utime_failed - | touch evil.txt && echo tags D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `utime' D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `block in touch' D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `each' D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `touch' D:/a/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:463:in `block (2 levels) in test_remove_unparseable_CVE_2021_31799' 460: temp_dir do 461: file_list = ['| touch evil.txt && echo tags'] 462: file_list.each do |f| => 463: FileUtils.touch f 464: end 465: 466: assert_equal file_list, @rdoc.remove_unparseable(file_list) ``` ruby/rdoc@a7df7dc8fa * [ruby/rdoc] Follow-up rubygems Use test-unit assertions instead of minitest. ruby/rdoc@d6a6209d7f * [ruby/rdoc] Drop support for Ruby 2.4 ruby/rdoc@f480b970cc * simple rescue+while+break should not use `throw` 609de71 fixes the issue by using `throw` insn if `ensure` is used. However, that patch introduce additional `throw` even if it is not needed. This patch solves the issue. This issue is pointed by @mame. * Get rid of sporadic WSAEACCES on Windows [ruby-dev:42661] * ripper: assertions for rescue/ensure in method body * ripper: wrap endless method in bodystmt [Bug #17869] * Avoid setting the visibility of refinement method entries Since refinement search is always performed, these entries should always be public. The method entry that the refinement search returns decides the visibility. Fixes [Bug #17822] * * 2021-05-22 [ci skip] * Build CDHASH properly when loading iseq from binary Before this change, CDHASH operands were built as plain hashes when loaded from binary. Without setting up the hash with the correct st_table type, the hash can sometimes be an ar_table. When the hash is an ar_table, lookups can call the `eql?` method on keys of the hash, which makes the `opt_case_dispatch` instruction not "leaf" as it implicitly declares. The following script trips the stack canary for checking the leaf attribute for `opt_case_dispatch` on VM_CHECK_MODE > 0 (enabled by default with RUBY_DEBUG). rb_vm_iseq = RubyVM::InstructionSequence iseq = rb_vm_iseq.compile(<<-EOF) case Class.new(String).new("foo") when "foo" 42 end EOF puts rb_vm_iseq.load_from_binary(iseq.to_binary).eval This commit changes the binary loading logic to build CDHASH with the right st_table type. The dumping logic and the dump format stays the same * Do not allow array modifications after freeze inside sort! If freezing an array inside sort!, previously the array could be modified after the freeze. This checks whether the receiver is frozen after every yield and potential call to #> or #<, preventing modifications if the receiver is frozen inside the block or by the #> or #< call. Fixes [Bug #17739] * Refined portability of test for [Bug #17739] The order of arguments to callback of qsort is not defined. That means `a` may not be 3 at all. * Update a comment about what 'inline' attr means * Show a backtrace when tool/extlibs.rb fails I'd like to retry this kind of error, but showing no backtrace is hard to deal with. https://github.com/ruby/ruby/runs/2644908002 * Use YAML.safe_load to use the permitted_classes option * Refactor num_zero_p function (ruby#4522) * * 2021-05-24 [ci skip] * [ruby/irb] respect NO_COLOR environment variable When `NO_COLOR` is set to any non-nil value, output is not colorized. See https://no-color.org/ ruby/irb@401d0916fe * [ruby/irb] update test/irb/test_init.rb to avoid useless eval Co-authored-by: Nobuyoshi Nakada <[email protected]> ruby/irb@2dfdc031ec * Set USE_COLORIZE to the default value in a test * xibbar is retired from cgi.rb maintainer * add rb_id2str to lldb debugging scripts * * 2021-05-25 [ci skip] * Removed tracer from ruby repo * Removed dbm from ruby repo * Revert "Remove .travis.yml" to revive Travis. This reverts commit 6b978d5. * .travis.yml: Ubuntu 20.04 Focal Fossa This is a LTS. Must be better than Xenial. * .travis.yml: Update to use arm64/ppc64le/s390x. * Use only the free pipelines arm64/ppc64le/s390x without credits on Travis. See <https://docs.travis-ci.com/user/billing-overview/#partner-queue-solution>. * Add ppc64le case. * Update the gcc to gcc-11. * Remove unused logic. * Add the `tool/travis_wait.sh` to avoid a command timeout. * Run the tests skipping some failing tests. * Set `TEST_ALL_SKIPPED_TESTS` env to skip the tests. * Run the tests separately returning ok status. The tests are executed if `TEST_ALL_SKIPPED_TESTS` env is set or `TEST_ALL_SEPARATED_TESTS` env is set. * Add `tool/ci_functions.sh` to manage the functions used in CI. * Add arm64 to allow_failures due to the following issue. An arm64 job sometimes does not start right now. https://travis-ci.community/t/11629 * bootstraptest/test_ractor.rb: Skip an assertion on Travis arm64. Skip the assertion to test the `Ractor.select` from multiple ractors that rarely fails on Travis arm64. See <https://bugs.ruby-lang.org/issues/17878>. * Removed gdbm from ruby repo * Update the latest list of default gems for misc/expand_tabs.rb * Add Travis badge image to `README.md`. [ci skip] (ruby#4527) Align the order of the badges with ones on the wiki page. https://bugs.ruby-lang.org/projects/ruby/wiki/CIServers * Disable compaction on platforms that can't support it Manual compaction also requires a read barrier, so we need to disable even manual compaction on platforms that don't support mprotect. [Bug #17871] * * 2021-05-26 [ci skip] * Ignore lib/irb/ext/tracer.rb with TestRequireLib because tracer library was removed from ruby repo * RSS library is the bundled gems now * Add Thread#native_thread_id [Feature #17853] * Add NEWS about 4665515 * Add Thread#native_thread_id [Feature #17853] * Suppress debug message * Rescue NotImplementedError for a test of Thread#native_thread_id http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20210526T070003Z.fail.html.gz ``` 1) Error: TestThread#test_thread_native_thread_id: NotImplementedError: native_thread_id() function is unimplemented on this machine /export/home/users/chkbuild/cb-gcc/tmp/build/20210526T070003Z/ruby/test/ruby/test_thread.rb:1338:in `native_thread_id' /export/home/users/chkbuild/cb-gcc/tmp/build/20210526T070003Z/ruby/test/ruby/test_thread.rb:1338:in `test_thread_native_thread_id' ``` * .travis.yml: Remove skipped tests on ppc64le. It was fixed at fc832ff . * Fill out switch statement in push_mark_stack When objects are popped from the mark stack, we check that the object is the right type (otherwise an rb_bug happens). The problem is that when we pop a bad object from the stack, we have no idea what pushed the bad object on the stack. This change makes an error happen when a bad object is pushed on the mark stack, that way we can track down the source of the bug. Co-authored-by: Jeremy Evans <[email protected]> Co-authored-by: git <[email protected]> Co-authored-by: Nobuyoshi Nakada <[email protected]> Co-authored-by: aycabta <[email protected]> Co-authored-by: Yusuke Endoh <[email protected]> Co-authored-by: Koichi Sasada <[email protected]> Co-authored-by: Alan Wu <[email protected]> Co-authored-by: Takashi Kokubun <[email protected]> Co-authored-by: S.H <[email protected]> Co-authored-by: Mark Delk <[email protected]> Co-authored-by: Hiroshi SHIBATA <[email protected]> Co-authored-by: Aaron Patterson <[email protected]> Co-authored-by: Jun Aruga <[email protected]> Co-authored-by: 卜部昌平 <[email protected]> Co-authored-by: Jun Aruga <[email protected]> Co-authored-by: NARUSE, Yui <[email protected]>
1 parent 60f3f25 commit e8f6092

Some content is hidden

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

60 files changed

+905
-5264
lines changed

.travis.yml

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# -*- YAML -*-
2+
# Copyright (C) 2011 Urabe, Shyouhei. All rights reserved.
3+
#
4+
# This file is a part of the programming language Ruby. Permission is hereby
5+
# granted, to either redistribute or modify this file, provided that the
6+
# conditions mentioned in the file COPYING are met. Consult the file for
7+
# details.
8+
9+
# We only manage non-amd64 free pipelines.
10+
# https://docs.travis-ci.com/user/billing-overview/
11+
12+
language: c
13+
14+
os: linux
15+
16+
dist: focal
17+
18+
git:
19+
quiet: true
20+
21+
cache:
22+
ccache: true
23+
directories:
24+
- $HOME/config_2nd
25+
- $HOME/.downloaded-cache
26+
27+
env:
28+
global:
29+
# Reset timestamps early
30+
- _=$(touch NEWS && find . -type f -exec touch -r NEWS {} +)
31+
- CONFIGURE_TTY=no
32+
- CCACHE_COMPILERCHECK=none
33+
- CCACHE_NOCOMPRESS=1
34+
- CCACHE_MAXSIZE=512Mi
35+
- NPROC="`nproc`"
36+
# JOBS and SETARCH are overridden when necessary; see below.
37+
- JOBS=-j$((1+${NPROC}))
38+
- SETARCH=
39+
- RUBY_PREFIX=/tmp/ruby-prefix
40+
- GEMS_FOR_TEST='timezone tzinfo'
41+
- UPDATE_UNICODE="UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
42+
# The tests skipped in `make test-all`.
43+
- TEST_ALL_SKIPPED_TESTS=
44+
# Run the separated tests with allowing failures.
45+
- RUN_SEPARATED_TESTS=true
46+
# The tests executed separately by `make test-all`.
47+
- TEST_ALL_SEPARATED_TESTS=
48+
# https://github.com/travis-ci/travis-build/blob/e411371dda21430a60f61b8f3f57943d2fe4d344/lib/travis/build/bash/travis_apt_get_options.bash#L7
49+
- travis_apt_get_options='--allow-downgrades --allow-remove-essential --allow-change-held-packages'
50+
- travis_apt_get_options="-yq --no-install-suggests --no-install-recommends $travis_apt_get_options"
51+
# -O1 is faster than -O3 in our tests.
52+
- optflags=-O1
53+
# -g0 disables backtraces when SEGV. Do not set that.
54+
- debugflags=-ggdb3
55+
56+
.org.ruby-lang.ci.matrix-definitions:
57+
58+
- &gcc-10
59+
compiler: gcc-10
60+
before_install:
61+
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
62+
- >-
63+
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
64+
ccache
65+
gcc-10
66+
g++-10
67+
libffi-dev
68+
libgdbm-dev
69+
libncurses-dev
70+
libncursesw5-dev
71+
libreadline-dev
72+
libssl-dev
73+
libyaml-dev
74+
openssl
75+
zlib1g-dev
76+
77+
# --------
78+
79+
- &arm64-linux
80+
name: arm64-linux
81+
arch: arm64
82+
<<: *gcc-10
83+
84+
- &ppc64le-linux
85+
name: ppc64le-linux
86+
arch: ppc64le
87+
<<: *gcc-10
88+
89+
- &s390x-linux
90+
name: s390x-linux
91+
arch: s390x
92+
<<: *gcc-10
93+
94+
- &arm32-linux
95+
name: arm32-linux
96+
arch: arm64
97+
# https://packages.ubuntu.com/focal/crossbuild-essential-armhf
98+
compiler: arm-linux-gnueabihf-gcc
99+
env:
100+
- SETARCH='setarch linux32 --verbose --32bit'
101+
before_install:
102+
- sudo dpkg --add-architecture armhf
103+
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
104+
- >-
105+
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
106+
ccache
107+
crossbuild-essential-armhf
108+
libc6:armhf
109+
libstdc++-10-dev:armhf
110+
libffi-dev:armhf
111+
libgdbm-dev:armhf
112+
libncurses-dev:armhf
113+
libncursesw5-dev:armhf
114+
libreadline-dev:armhf
115+
libssl-dev:armhf
116+
linux-libc-dev:armhf
117+
zlib1g-dev:armhf
118+
119+
matrix:
120+
include:
121+
# Build every commit (Allowed Failures):
122+
- <<: *arm32-linux
123+
- <<: *arm64-linux
124+
- <<: *ppc64le-linux
125+
- <<: *s390x-linux
126+
allow_failures:
127+
# An arm64 job sometimes does not start right now.
128+
# https://travis-ci.community/t/11629
129+
- name: arm32-linux
130+
- name: arm64-linux
131+
# - name: ppc64le-linux
132+
# - name: s390x-linux
133+
fast_finish: true
134+
135+
before_script:
136+
- . tool/ci_functions.sh
137+
- |-
138+
if [ -n "${TEST_ALL_SKIPPED_TESTS}" ]; then
139+
TEST_ALL_OPTS="${TEST_ALL_OPTS} $(ci_to_excluded_test_opts "${TEST_ALL_SKIPPED_TESTS}")"
140+
if [ -z "${TEST_ALL_SEPARATED_TESTS}" ]; then
141+
TEST_ALL_SEPARATED_TESTS="${TEST_ALL_SKIPPED_TESTS}"
142+
fi
143+
fi
144+
- |-
145+
if [ -n "${TEST_ALL_SEPARATED_TESTS}" ]; then
146+
TEST_ALL_OPTS_SEPARATED="$(ci_to_included_test_opts "${TEST_ALL_SEPARATED_TESTS}")"
147+
fi
148+
- echo TEST_ALL_OPTS="${TEST_ALL_OPTS}" TEST_ALL_OPTS_SEPARATED="${TEST_ALL_OPTS_SEPARATED}"
149+
- rm -fr .ext autom4te.cache
150+
- |-
151+
[ -d ~/.downloaded-cache ] ||
152+
mkdir ~/.downloaded-cache
153+
- ln -s ~/.downloaded-cache
154+
- "> config.status"
155+
- "> .rbconfig.time"
156+
- sed -f tool/prereq.status template/Makefile.in common.mk > Makefile
157+
- make touch-unicode-files
158+
- make -s $JOBS $UPDATE_UNICODE up
159+
- make -s $JOBS srcs
160+
- rm -f config.status Makefile rbconfig.rb .rbconfig.time
161+
- |-
162+
if [ -d ~/config_2nd ]; then
163+
cp -pr ~/config_2nd build
164+
else
165+
mkdir build
166+
fi
167+
- mkdir config_1st config_2nd
168+
- chmod -R a-w .
169+
- chmod -R u+w build config_1st config_2nd
170+
- cd build
171+
- |-
172+
case "$CC" in
173+
gcc*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-diagnostics-color";;
174+
clang*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-color-diagnostics";;
175+
esac
176+
- |-
177+
[ ! -f config.cache ] ||
178+
[ "$CC" = "`sed -n s/^ac_cv_prog_CC=//p config.cache`" ] ||
179+
(set -x; exec rm config.cache)
180+
- $SETARCH ../configure -C --disable-install-doc --prefix=$RUBY_PREFIX $CONFIG_FLAG
181+
- cp -pr config.cache config.status .ext/include ../config_1st
182+
- $SETARCH make reconfig
183+
- cp -pr config.cache config.status .ext/include ../config_2nd
184+
- (cd .. && exec diff -ru config_1st config_2nd)
185+
- chmod u+w ..
186+
- rm -rf ~/config_2nd
187+
- mv ../config_2nd ~
188+
- chmod u-w ..
189+
- $SETARCH make -s $JOBS
190+
- make -s install
191+
- |-
192+
[ -z "${GEMS_FOR_TEST}" ] ||
193+
$RUBY_PREFIX/bin/gem install --no-document $GEMS_FOR_TEST
194+
- echo "raise 'do not load ~/.irbrc in test'" > ~/.irbrc
195+
196+
script:
197+
- $SETARCH make -s test -o showflags TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
198+
- ../tool/travis_wait.sh $SETARCH make -s test-all -o exts TESTOPTS="$JOBS -q --tty=no ${TEST_ALL_OPTS}" RUBYOPT="-w"
199+
# Run the failing tests separately returning ok status to check if it works,
200+
# visualize them.
201+
- |
202+
if [ "${RUN_SEPARATED_TESTS}" = true -a -n "${TEST_ALL_OPTS_SEPARATED}" ]; then
203+
$SETARCH make -s test-all -o exts TESTOPTS="$JOBS -v --tty=no ${TEST_ALL_OPTS_SEPARATED}" RUBYOPT="-w" || :
204+
fi
205+
- $SETARCH make -s test-spec MSPECOPT=-ff # not using `-j` because sometimes `mspec -j` silently dies
206+
- $SETARCH make -s -o showflags leaked-globals
207+
208+
# Branch matrix. Not all branches are Travis-ready so we limit branches here.
209+
branches:
210+
only:
211+
- master
212+
- /^ruby_\d_\d$/
213+
214+
# We want to be notified when something happens.
215+
notifications:
216+
irc:
217+
channels:
218+
- "chat.freenode.net#ruby-core"
219+
on_success: change # [always|never|change] # default: always
220+
on_failure: always # [always|never|change] # default: always
221+
template:
222+
- "%{message} by @%{author}: See %{build_url}"
223+
224+
webhooks:
225+
urls:
226+
- secure: mRsoS/UbqDkKkW5p3AEqM27d4SZnV6Gsylo3bm8T/deltQzTsGzZwrm7OIBXZv0UFZdE68XmPlyHfZFLSP2V9QZ7apXMf9/vw0GtcSe1gchtnjpAPF6lYBn7nMCbVPPx9cS0dwL927fjdRM1vj7IKZ2bk4F0lAJ25R25S6teqdk= # ruby-lang slack: ruby/simpler-alerts-bot (travis)
227+
on_success: never
228+
on_failure: always
229+
230+
email:
231+

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ Outstanding ones only.
101101
* Queue#initialize now accepts an Enumerable of initial values.
102102
[[Feature #17327]]
103103

104+
* Thread
105+
106+
* Thread#native_thread_id is added. [[Feature #17853]]
107+
104108
* Thread::Backtrace
105109

106110
* Thread::Backtrace.limit, which returns the value to limit backtrace

array.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3213,6 +3213,7 @@ rb_ary_rotate_m(int argc, VALUE *argv, VALUE ary)
32133213

32143214
struct ary_sort_data {
32153215
VALUE ary;
3216+
VALUE receiver;
32163217
struct cmp_opt_data cmp_opt;
32173218
};
32183219

@@ -3225,6 +3226,15 @@ sort_reentered(VALUE ary)
32253226
return Qnil;
32263227
}
32273228

3229+
static void
3230+
sort_returned(struct ary_sort_data *data)
3231+
{
3232+
if (rb_obj_frozen_p(data->receiver)) {
3233+
rb_raise(rb_eFrozenError, "array frozen during sort");
3234+
}
3235+
sort_reentered(data->ary);
3236+
}
3237+
32283238
static int
32293239
sort_1(const void *ap, const void *bp, void *dummy)
32303240
{
@@ -3238,7 +3248,7 @@ sort_1(const void *ap, const void *bp, void *dummy)
32383248
args[1] = b;
32393249
retval = rb_yield_values2(2, args);
32403250
n = rb_cmpint(retval, a, b);
3241-
sort_reentered(data->ary);
3251+
sort_returned(data);
32423252
return n;
32433253
}
32443254

@@ -3264,7 +3274,7 @@ sort_2(const void *ap, const void *bp, void *dummy)
32643274

32653275
retval = rb_funcallv(a, id_cmp, 1, &b);
32663276
n = rb_cmpint(retval, a, b);
3267-
sort_reentered(data->ary);
3277+
sort_returned(data);
32683278

32693279
return n;
32703280
}
@@ -3316,6 +3326,7 @@ rb_ary_sort_bang(VALUE ary)
33163326
long len = RARRAY_LEN(ary);
33173327
RBASIC_CLEAR_CLASS(tmp);
33183328
data.ary = tmp;
3329+
data.receiver = ary;
33193330
data.cmp_opt.opt_methods = 0;
33203331
data.cmp_opt.opt_inited = 0;
33213332
RARRAY_PTR_USE(tmp, ptr, {

bootstraptest/test_ractor.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ def test n
248248
30.times.map{|i|
249249
test i
250250
}
251-
} unless ENV['RUN_OPTS'] =~ /--jit-min-calls=5/ # This always fails with --jit-wait --jit-min-calls=5
251+
} unless ENV['RUN_OPTS'] =~ /--jit-min-calls=5/ || # This always fails with --jit-wait --jit-min-calls=5
252+
(ENV.key?('TRAVIS') && ENV['TRAVIS_CPU_ARCH'] == 'arm64') # https://bugs.ruby-lang.org/issues/17878
252253

253254
# Exception for empty select
254255
assert_match /specify at least one ractor/, %q{

compile.c

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5422,12 +5422,14 @@ add_ensure_range(rb_iseq_t *iseq, struct ensure_range *erange,
54225422
static bool
54235423
can_add_ensure_iseq(const rb_iseq_t *iseq)
54245424
{
5425-
if (ISEQ_COMPILE_DATA(iseq)->in_rescue && ISEQ_COMPILE_DATA(iseq)->ensure_node_stack) {
5426-
return false;
5427-
}
5428-
else {
5429-
return true;
5425+
struct iseq_compile_data_ensure_node_stack *e;
5426+
if (ISEQ_COMPILE_DATA(iseq)->in_rescue && (e = ISEQ_COMPILE_DATA(iseq)->ensure_node_stack) != NULL) {
5427+
while (e) {
5428+
if (e->ensure_node) return false;
5429+
e = e->prev;
5430+
}
54305431
}
5432+
return true;
54315433
}
54325434

54335435
static void
@@ -10781,7 +10783,6 @@ ibf_load_code(const struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t bytecod
1078110783
for (op_index=0; types[op_index]; op_index++, code_index++) {
1078210784
char type = types[op_index];
1078310785
switch (type) {
10784-
case TS_CDHASH:
1078510786
case TS_VALUE:
1078610787
{
1078710788
VALUE op = ibf_load_small_value(load, &reading_pos);
@@ -10793,6 +10794,20 @@ ibf_load_code(const struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t bytecod
1079310794
}
1079410795
break;
1079510796
}
10797+
case TS_CDHASH:
10798+
{
10799+
VALUE op = ibf_load_small_value(load, &reading_pos);
10800+
VALUE v = ibf_load_object(load, op);
10801+
v = rb_hash_dup(v); // hash dumped as frozen
10802+
RHASH_TBL_RAW(v)->type = &cdhash_type;
10803+
rb_hash_rehash(v); // hash function changed
10804+
freeze_hide_obj(v);
10805+
10806+
code[code_index] = v;
10807+
RB_OBJ_WRITTEN(iseqv, Qundef, v);
10808+
FL_SET(iseqv, ISEQ_MARKABLE_ISEQ);
10809+
break;
10810+
}
1079610811
case TS_ISEQ:
1079710812
{
1079810813
VALUE op = (VALUE)ibf_load_small_value(load, &reading_pos);

defs/gmake.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ nproc = $(subst -j,,$(filter -j%,$(MFLAGS)))
99
ifneq ($(filter %darwin%,$(arch)),)
1010
INSTRUBY_ENV += SDKROOT=/
1111
endif
12+
INSTRUBY_ARGS += --gnumake
1213

1314
CHECK_TARGETS := great exam love check test check% test% btest%
1415
# expand test targets, and those dependents

0 commit comments

Comments
 (0)