Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Ractor-Local-GC-v…
Browse files Browse the repository at this point in the history
…ersion-2
  • Loading branch information
rm155 committed Apr 2, 2024
2 parents b7f795a + 24a7407 commit 3a5ecae
Show file tree
Hide file tree
Showing 155 changed files with 3,865 additions and 1,742 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:
# environment variables (plus the "echo $GITHUB_ENV" hack) is to reroute that
# restriction.
env:
default_cc: clang-17
default_cc: clang-18
append_cc: ''

# -O1 is faster than -O3 in our tests... Majority of time are consumed trying
Expand Down Expand Up @@ -81,6 +81,7 @@ jobs:
optflags: '-O2'
shared: disable
# check: true
- { name: clang-19, env: { default_cc: clang-19 } }
- { name: clang-18, env: { default_cc: clang-18 } }
- { name: clang-17, env: { default_cc: clang-17 } }
- { name: clang-16, env: { default_cc: clang-16 } }
Expand Down Expand Up @@ -213,7 +214,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || matrix.entry.env.default_cc || 'clang-17' }}
image: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || matrix.entry.env.default_cc || 'clang-18' }}
options: --user root

if: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Set up Launchable
uses: ./.github/actions/launchable/setup
with:
os: ${{ matrix.os }}
os: ${{ matrix.os || (github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14')}}
test-opts: ${{ matrix.test_opts }}
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
timeout-minutes: 40
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '-q --tty=no --excludes-dir="../src/test/.excludes-prism" --exclude="test_ast.rb" --exclude="error_highlight/test_error_highlight.rb" --exclude="prism/encoding_test.rb"'
RUBY_TESTOPTS: '-q --tty=no --excludes-dir="../src/test/.excludes-prism" --exclude="test_ast.rb" --exclude="error_highlight/test_error_highlight.rb" --exclude="prism/encoding_test.rb" --exclude="prism/locals_test.rb" --exclude="prism/newline_test.rb"'
RUN_OPTS: ${{ matrix.run_opts }}

- name: make test-prism-spec
Expand Down
30 changes: 15 additions & 15 deletions LEGAL
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ mentioned below.

[ccan/list/list.h]

This file is licensed under the {MIT License}[rdoc-label:label-MIT+License].
This file is licensed under the {MIT License}[rdoc-ref:@MIT+License].

[coroutine]

Unless otherwise specified, these files are licensed under the
{MIT License}[rdoc-label:label-MIT+License].
{MIT License}[rdoc-ref:@MIT+License].

[include/ruby/onigmo.h]
[include/ruby/oniguruma.h]
Expand Down Expand Up @@ -546,7 +546,7 @@ mentioned below.

[vsnprintf.c]

This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].
This file is under the {old-style BSD license}[rdoc-ref:@Old-style+BSD+license].

>>>
Copyright (c) 1990, 1993::
Expand Down Expand Up @@ -577,7 +577,7 @@ mentioned below.

[missing/crypt.c]

This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].
This file is under the {old-style BSD license}[rdoc-ref:@Old-style+BSD+license].

>>>
Copyright (c) 1989, 1993::
Expand All @@ -588,7 +588,7 @@ mentioned below.

[missing/setproctitle.c]

This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].
This file is under the {old-style BSD license}[rdoc-ref:@Old-style+BSD+license].

>>>
Copyright 2003:: Damien Miller
Expand Down Expand Up @@ -879,7 +879,7 @@ mentioned below.
>>>
RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
Weirich and others. You can redistribute it and/or modify it under
either the terms of the {MIT license}[rdoc-label:label-MIT+License], or the conditions
either the terms of the {MIT license}[rdoc-ref:@MIT+License], or the conditions
below:

1. You may make and give away verbatim copies of the source form of the
Expand Down Expand Up @@ -941,7 +941,7 @@ mentioned below.
Portions copyright (c) 2010:: Andre Arko
Portions copyright (c) 2009:: Engine Yard

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[lib/bundler/vendor/thor]

Expand All @@ -950,16 +950,16 @@ mentioned below.
>>>
Copyright (c) 2008 Yehuda Katz, Eric Hodel, et al.

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[lib/rubygems/resolver/molinillo]
[lib/rubygems/vendor/molinillo]

molinillo is under the following license.

>>>
Copyright (c) 2014 Samuel E. Giddins segiddins@segiddins.me

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[lib/bundler/vendor/pub_grub]

Expand All @@ -968,7 +968,7 @@ mentioned below.
>>>
Copyright (c) 2018 John Hawthorn

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[lib/bundler/vendor/connection_pool]

Expand All @@ -977,7 +977,7 @@ mentioned below.
>>>
Copyright (c) 2011 Mike Perham

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[lib/bundler/vendor/net-http-persistent]

Expand All @@ -986,7 +986,7 @@ mentioned below.
>>>
Copyright (c) Eric Hodel, Aaron Patterson

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[lib/did_you_mean]
[lib/did_you_mean.rb]
Expand All @@ -997,7 +997,7 @@ mentioned below.
>>>
Copyright (c) 2014-2016 Yuki Nishijima

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[lib/error_highlight]
[lib/error_highlight.rb]
Expand All @@ -1008,7 +1008,7 @@ mentioned below.
>>>
Copyright (c) 2021 Yusuke Endoh

{MIT License}[rdoc-label:label-MIT+License]
{MIT License}[rdoc-ref:@MIT+License]

[benchmark/so_ackermann.rb]
[benchmark/so_array.rb]
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ The following default gems are updated.
The following bundled gems are updated.

* minitest 5.22.3
* rake 13.2.0
* test-unit 3.6.2
* net-ftp 0.3.4
* net-imap 0.4.10
* net-smtp 0.5.0
* rbs 3.4.4
* typeprof 0.21.11
* debug 1.9.1
* debug 1.9.2

The following bundled gems are promoted from default gems.

Expand Down
1 change: 1 addition & 0 deletions array.c
Original file line number Diff line number Diff line change
Expand Up @@ -6647,6 +6647,7 @@ ary_sample(rb_execution_context_t *ec, VALUE ary, VALUE randgen, VALUE nv, VALUE
});
DATA_PTR(vmemo) = 0;
st_free_table(memo);
RB_GC_GUARD(vmemo);
}
else {
result = rb_ary_dup(ary);
Expand Down
8 changes: 8 additions & 0 deletions bootstraptest/test_finalizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@
ObjectSpace.define_finalizer(a2,proc{a1.inspect})
ObjectSpace.define_finalizer(a1,proc{})
}, '[ruby-dev:35778]'

assert_equal 'true', %q{
obj = Object.new
id = obj.object_id
ObjectSpace.define_finalizer(obj, proc { |i| print(id == i) })
nil
}
2 changes: 1 addition & 1 deletion bootstraptest/test_syntax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def lines
}
def assert_syntax_error expected, code, message = ''
assert_match /^#{Regexp.escape(expected)}/,
"begin eval(%q{#{code}}, nil, '', 0)"'; rescue SyntaxError => e; e.message[/(?:\A:(?:\d+:)?(?: syntax error,)?|\^) (.*)/, 1] end', message
"begin eval(%q{#{code}}, nil, '', 0)"'; rescue SyntaxError => e; e.message[/(?:\^|\A:(?:\d+:)?(?! syntax errors? found)(?: syntax error,)?) (.*)/, 1] end', message
end
assert_syntax_error "unterminated string meets end of file", '().."', '[ruby-dev:29732]'
assert_equal %q{[]}, %q{$&;[]}, '[ruby-dev:31068]'
Expand Down
17 changes: 17 additions & 0 deletions bootstraptest/test_yjit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4769,3 +4769,20 @@ def tests
tests
}

# test integer left shift with constant rhs
assert_equal [0x80000000000, 'a+', :ok].inspect, %q{
def shift(val) = val << 43
def tests
int = shift(1)
str = shift("a")
Integer.define_method(:<<) { |_| :ok }
redef = shift(1)
[int, str, redef]
end
tests
}
4 changes: 2 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,10 @@ clean-local:: clean-runnable
bin/clean-runnable:: PHONY
$(Q)$(CHDIR) bin 2>$(NULL) && $(RM) $(PROGRAM) $(WPROGRAM) $(GORUBY)$(EXEEXT) bin/*.$(DLEXT) 2>$(NULL) || $(NULLCMD)
lib/clean-runnable:: PHONY
$(Q)$(CHDIR) lib 2>$(NULL) && $(RM) $(LIBRUBY_A) $(LIBRUBY) $(LIBRUBY_ALIASES) $(RUBY_BASE_NAME)/$(RUBY_PROGRAM_VERSION) $(RUBY_BASE_NAME)/vendor_ruby 2>$(NULL) || $(NULLCMD)
$(Q)$(CHDIR) lib 2>$(NULL) && $(RM) $(LIBRUBY_A) $(LIBRUBY) $(LIBRUBY_ALIASES) $(RUBY_BASE_NAME)/$(ruby_version) $(RUBY_BASE_NAME)/vendor_ruby 2>$(NULL) || $(NULLCMD)
clean-runnable:: bin/clean-runnable lib/clean-runnable PHONY
$(Q)$(RMDIR) lib/$(RUBY_BASE_NAME) lib bin 2>$(NULL) || $(NULLCMD)
-$(Q)$(RM) $(EXTOUT)/$(arch)/rbconfig.rb
-$(Q)$(RM) $(EXTOUT)/$(arch)/rbconfig.rb $(EXTOUT)/common/$(arch)
-$(Q)$(RMALL) exe/
clean-ext:: PHONY
clean-golf: PHONY
Expand Down
2 changes: 2 additions & 0 deletions compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq)

#if USE_YJIT
rb_yjit_live_iseq_count++;
rb_yjit_iseq_alloc_count++;
#endif

return COMPILE_OK;
Expand Down Expand Up @@ -11322,6 +11323,7 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *const anchor,
}
}
DATA_PTR(labels_wrapper) = 0;
RB_GC_GUARD(labels_wrapper);
validate_labels(iseq, labels_table);
if (!ret) return ret;
return iseq_setup(iseq, anchor);
Expand Down
14 changes: 7 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ AC_ARG_WITH(baseruby,
[
AC_PATH_PROG([BASERUBY], [ruby], [false])
])
# BASERUBY must be >= 3.0.0. Note that `"3.0.0" > "3.0"` is true.
AS_IF([test "$HAVE_BASERUBY" != no -a "`RUBYOPT=- $BASERUBY --disable=gems -e 'print true if RUBY_VERSION > "3.0"' 2>/dev/null`" = true], [
AS_IF([test "$HAVE_BASERUBY" != no], [
RUBYOPT=- $BASERUBY --disable=gems "${tooldir}/missing-baseruby.bat" || HAVE_BASERUBY=no
])
AS_IF([test "${HAVE_BASERUBY:=no}" != no], [
AS_CASE(["$build_os"], [mingw*], [
# Can MSys shell run a command with a drive letter?
RUBYOPT=- `cygpath -ma "$BASERUBY"` --disable=gems -e exit 2>/dev/null || HAVE_BASERUBY=no
])
RUBY_APPEND_OPTION(BASERUBY, "--disable=gems")
BASERUBY_VERSION=`$BASERUBY -v`
$BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub >&AS_MESSAGE_FD
], [
HAVE_BASERUBY=no
])
AS_IF([test "$HAVE_BASERUBY" = no], [
AS_IF([test "$cross_compiling" = yes], [AC_MSG_ERROR([executable host ruby is required for cross-compiling])])
BASERUBY=$srcdir/tool/missing-baseruby.bat
BASERUBY=${tooldir}/missing-baseruby.bat
])
AC_SUBST(BASERUBY)
AC_SUBST(HAVE_BASERUBY)
Expand Down Expand Up @@ -1432,7 +1432,7 @@ AC_SYS_LARGEFILE
# which is not added by AC_SYS_LARGEFILE.
AS_IF([test x"$enable_largefile" != xno], [
AS_CASE(["$target_os"], [solaris*], [
AC_MSG_CHECKING([wheather _LARGEFILE_SOURCE should be defined])
AC_MSG_CHECKING([whether _LARGEFILE_SOURCE should be defined])
AS_CASE(["${ac_cv_sys_file_offset_bits}:${ac_cv_sys_large_files}"],
["64:"|"64:no"|"64:unknown"], [
# insert _LARGEFILE_SOURCE before _FILE_OFFSET_BITS line
Expand Down Expand Up @@ -2973,7 +2973,7 @@ AS_IF([test "x$ac_cv_func_ioctl" = xyes], [
}

[begin]_group "runtime section" && {
dnl wheather use dln_a_out or not
dnl whether use dln_a_out or not
AC_ARG_WITH(dln-a-out,
AS_HELP_STRING([--with-dln-a-out], [dln_a_out is deprecated]),
[
Expand Down
Loading

0 comments on commit 3a5ecae

Please sign in to comment.