Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Ruby to 3.1.2 #167

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
BUNDLE_JOBS: "4"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.7.1
ruby-3.1.2
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source 'https://rubygems.org'

ruby '2.7.1'
ruby '3.1.2'

gem 'activesupport', '~> 6.0', '>= 6.0.3.2', require: 'active_support/all'
gem 'minitest', '~> 5.14', '>= 5.14.1'
Expand Down
33 changes: 16 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GIT
remote: https://github.com/kern/minitest-reporters.git
revision: 9cb9e78aed69bfe4eed6c27b5b795e8bb4ad708f
revision: 466b060a906298148836e368916aee930d28f618
specs:
minitest-reporters (1.4.2)
minitest-reporters (1.5.0)
ansi
builder
minitest (>= 5.0)
Expand All @@ -11,29 +11,28 @@ GIT
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.3.2)
activesupport (6.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ansi (1.5.0)
builder (3.2.4)
coderay (1.1.3)
concurrent-ruby (1.1.6)
i18n (1.8.3)
concurrent-ruby (1.1.10)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
method_source (1.0.0)
minitest (5.14.1)
minitest (5.15.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.1)
ruby-progressbar (1.10.1)
thread_safe (0.3.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
zeitwerk (2.4.0)
rake (13.0.6)
ruby-progressbar (1.11.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
zeitwerk (2.5.4)

PLATFORMS
mswin64
Expand All @@ -48,7 +47,7 @@ DEPENDENCIES
rake (~> 13.0, >= 13.0.1)

RUBY VERSION
ruby 2.7.1p83
ruby 3.1.2p20

BUNDLED WITH
2.1.4
6 changes: 3 additions & 3 deletions lib/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def log(message = nil)
warn message
end

def stuff(library, &block)
def stuff(library, &)
source = File.join PRJ_ROOT, 'vendor', library
target = File.join @options[:tmpdir], library

Expand All @@ -498,7 +498,7 @@ def stuff(library, &block)
log "=> Stuffing #{library}..."

@utils.capture_run_io "stuff_#{library}" do
@utils.chdir(target, &block)
@utils.chdir(target, &)
end

log "=> Stuffed #{library}"
Expand Down Expand Up @@ -789,7 +789,7 @@ def local_toolchain_env
{
'CI' => 'true',
'GEM_PATH' => File.join(@ruby_install, 'lib', 'ruby', 'gems', self.class.ruby_api_version),
'PATH' => "#{File.join(@ruby_install, 'bin')}:#{ENV['PATH']}",
'PATH' => "#{File.join(@ruby_install, 'bin')}:#{ENV.fetch('PATH', nil)}",
'ENCLOSE_IO_USE_ORIGINAL_RUBY' => 'true',
'ENCLOSE_IO_RUBYC_1ST_PASS' => 'true',
'ENCLOSE_IO_RUBYC_2ND_PASS' => nil
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def run_allow_failures(*args)
status
end

def chdir(path, &block)
def chdir(path, &)
warn "-> cd #{path}" unless @options[:quiet]
Dir.chdir(path, &block)
Dir.chdir(path, &)
warn "-> cd #{Dir.pwd}" unless @options[:quiet]
end

Expand All @@ -90,7 +90,7 @@ def cp(from, to)

def cp_r(from, to, options = {})
warn "-> cp -r #{from.inspect} #{to.inspect}" unless @options[:quiet]
FileUtils.cp_r(from, to, options)
FileUtils.cp_r(from, to, **options)
end

def rm(path)
Expand Down
104 changes: 104 additions & 0 deletions ruby/.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
version: '{build}'
init:
- git config --global user.name git
- git config --global user.email [email protected]
- git config --global core.autocrlf false
- git config --global core.eol lf
- git config --global advice.detachedHead 0
shallow_clone: true
clone_depth: 10
platform:
- x64
skip_commits:
message: /^\[DOC\]/
files:
- doc/*
- '**/*.md'
- '**/*.rdoc'
environment:
ruby_version: "24-%Platform%"
zlib_version: "1.2.11"
matrix:
- build: vs
vs: 120
ssl: OpenSSL
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
GEMS_FOR_TEST: ""
- build: vs
vs: 140
ssl: OpenSSL-v111
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
GEMS_FOR_TEST: ""
RELINE_TEST_ENCODING: "UTF-8"
for:
-
matrix:
only:
- build: vs
install:
- ver
- chcp
- SET BITS=%Platform:x86=32%
- SET BITS=%BITS:x=%
- SET OPENSSL_DIR=C:\%ssl%-Win%BITS%
- CALL SET vcvars=%%^VS%VS%COMNTOOLS^%%..\..\VC\vcvarsall.bat
- SET vcvars
- '"%vcvars%" %Platform:x64=amd64%'
- SET ruby_path=C:\Ruby%ruby_version:-x86=%
- SET PATH=\usr\local\bin;%ruby_path%\bin;%PATH%;C:\msys64\mingw64\bin;C:\msys64\usr\bin
- ruby --version
- 'cl'
- echo> Makefile srcdir=.
- echo>> Makefile MSC_VER=0
- echo>> Makefile RT=none
- echo>> Makefile RT_VER=0
- echo>> Makefile BUILTIN_ENCOBJS=nul
- type win32\Makefile.sub >> Makefile
- nmake %mflags% up VCSUP="echo Update OK"
- nmake %mflags% extract-extlibs
- del Makefile
- mkdir \usr\local\bin
- mkdir \usr\local\include
- mkdir \usr\local\lib
- SET ZLIB_ZIP=.downloaded-cache\zlib%zlib_version:.=%.zip
- if not exist %ZLIB_ZIP% curl -fsSL -o %ZLIB_ZIP% --retry 10 https://zlib.net/zlib%zlib_version:.=%.zip
- 7z x -aos -o%APPVEYOR_BUILD_FOLDER%\ext\zlib %ZLIB_ZIP%
- for %%I in (%OPENSSL_DIR%\*.dll) do mklink /h \usr\local\bin\%%~nxI %%I
- attrib +r /s /d
- mkdir %Platform%-mswin_%vs%
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- cd %Platform%-mswin_%vs%
- ..\win32\configure.bat --without-ext=+,dbm,gdbm,readline --with-opt-dir=/usr/local --with-openssl-dir=%OPENSSL_DIR:\=/%
- nmake -l
- nmake install-nodoc
- \usr\bin\ruby -v -e "p :locale => Encoding.find('locale'), :filesystem => Encoding.find('filesystem')"
- if not "%GEMS_FOR_TEST%" == "" \usr\bin\gem install --no-document %GEMS_FOR_TEST%
- \usr\bin\ruby -ropenssl -e "puts 'Build ' + OpenSSL::OPENSSL_VERSION, 'Runtime ' + OpenSSL::OPENSSL_LIBRARY_VERSION"
test_script:
- set /a JOBS=%NUMBER_OF_PROCESSORS%
- nmake -l "TESTOPTS=-v -q" btest
- nmake -l "TESTOPTS=-v -q" test-basic
- nmake -l "TESTOPTS=-v --timeout-scale=3.0 --excludes=../test/excludes/_appveyor -j%JOBS% --exclude readline --exclude win32ole --exclude test_bignum --exclude test_syntax --exclude test_open-uri --exclude test_bundled_ca" test-all
# separately execute tests without -j which may crash worker with -j.
- nmake -l "TESTOPTS=-v --timeout-scale=3.0 --excludes=../test/excludes/_appveyor" test-all TESTS="../test/win32ole ../test/ruby/test_bignum.rb ../test/ruby/test_syntax.rb ../test/open-uri/test_open-uri.rb ../test/rubygems/test_bundled_ca.rb"
- nmake -l test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows
notifications:
- provider: Webhook
method: POST
url:
secure: CcFlJNDJ/a6to7u3Z4Fnz6dScEPNx7hTha2GkSRlV+1U6dqmxY/7uBcLXYb9gR3jfQk6w+2o/HrjNAyXMNGU/JOka3s2WRI4VKitzM+lQ08owvJIh0R7LxrGH0J2e81U # ruby-lang slack: ruby/simpler-alerts-bot
body: >-
{{^isPullRequest}}
{
"ci": "AppVeyor CI",
"env": "Visual Studio 2013 / 2015",
"url": "{{buildUrl}}",
"commit": "{{commitId}}",
"branch": "{{branch}}"
}
{{/isPullRequest}}
on_build_success: false
on_build_failure: true
on_build_status_changed: false
64 changes: 64 additions & 0 deletions ruby/.cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This CI is used to test Arm cases. We can set the maximum 16 tasks.
# The entire testing design is inspired from .github/workflows/compilers.yml.

# By default, Cirrus mounts an empty volume to `/tmp`
# which triggers all sorts of warnings like "system temporary path is world-writable: /tmp".
# Lets workaround it by specifying a custom volume mount point.
env:
CIRRUS_VOLUME: /cirrus-ci-volume
LANG: C.UTF-8

task:
name: Arm64 Graviton2 / $CC
skip: "changesIncludeOnly('doc/**', '**.{md,rdoc}')"
arm_container:
# We use the arm64 images at http://ghcr.io/ruby/ruby-ci-image .
image: ghcr.io/ruby/ruby-ci-image:$CC
# Define the used cpu core in each matrix task. We can use total 16 cpu
# cores in entire matrix. [cpu] = [total cpu: 16] / [number of tasks]
cpu: 8
# We can request maximum 4 GB per cpu.
# [memory per task] = [memory per cpu: 4 GB] * [cpu]
memory: 32G
env:
CIRRUS_CLONE_DEPTH: 50
optflags: '-O1'
debugflags: '-ggdb3'
RUBY_PREFIX: /tmp/ruby-prefix
RUBY_DEBUG: ci rgengc
RUBY_TESTOPTS: >-
-q
--color=always
--tty=no
matrix:
CC: clang-12
CC: gcc-11
id_script: id
set_env_script:
# Set `GNUMAKEFLAGS`, because the flags are GNU make specific. Note using
# the `make` environment variable used in compilers.yml causes some rubygems
# tests to fail.
# https://github.com/rubygems/rubygems/issues/4921
- echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> $CIRRUS_ENV
print_env_script:
- echo "GNUMAKEFLAGS=$GNUMAKEFLAGS"
# Arm containers are executed in AWS's EKS, and it's not yet supporting IPv6
# See https://github.com/aws/containers-roadmap/issues/835
disable_ipv6_script: sudo ./tool/disable_ipv6.sh
autogen_script: ./autogen.sh
configure_script: >-
./configure -C
--enable-debug-env
--disable-install-doc
--with-ext=-test-/cxxanyargs,+
--prefix="$RUBY_PREFIX"
make_extract-extlibs_script: make extract-extlibs
make_incs_script: make incs
make_script: make
make_leaked-globals_script: make leaked-globals
make_test_script: make test
make_install_script: make install
install_gems_for_test_script: $RUBY_PREFIX/bin/gem install --no-doc timezone tzinfo
make_test-tool_script: make test-tool
make_test-all_script: make test-all
make_test-spec_script: make test-spec
2 changes: 2 additions & 0 deletions ruby/.dir-locals.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

(c-mode . ((c-file-style . "ruby")))

(c++-mode . ((c-file-style . "ruby")))

(change-log-mode .
((buffer-file-coding-system . us-ascii)
(indent-tabs-mode . t)
Expand Down
10 changes: 9 additions & 1 deletion ruby/.document
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@
prelude.rb
rbconfig.rb

array.rb
ast.rb
dir.rb
gc.rb
io.rb
kernel.rb
marshal.rb
numeric.rb
nilclass.rb
pack.rb
ractor.rb
timev.rb
trace_point.rb
warning.rb

Expand All @@ -25,7 +33,7 @@ lib
ext

# rdoc files
NEWS
NEWS.md

README.md
README.ja.md
Expand Down
Loading