diff --git a/.github/workflows/c-check.yml b/.github/workflows/c-check.yml index 11ef122f5..dd7076d2c 100644 --- a/.github/workflows/c-check.yml +++ b/.github/workflows/c-check.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.4" + ruby-version: "4.0.0-preview2" bundler-cache: none - name: Set working directory as safe run: git config --global --add safe.directory $(pwd) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index b2245a1d7..a04583832 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -13,24 +13,24 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.2', '3.3', '3.4', head] + ruby: ['3.2', '3.3', '3.4', '4.0.0-preview2', head] rubyopt: [""] job: - test include: - ruby: head job: stdlib_test rubocop - - ruby: "3.4" + - ruby: "4.0.0-preview2" job: stdlib_test - - ruby: "3.4" + - ruby: "4.0.0-preview2" job: test rubyopt: "--enable-frozen-string-literal" - - ruby: "3.4" + - ruby: "4.0.0-preview2" job: stdlib_test rubyopt: "--enable-frozen-string-literal" - - ruby: "3.4" + - ruby: "4.0.0-preview2" job: rubocop validate test_doc build test_generate_stdlib raap - - ruby: "3.4" + - ruby: "4.0.0-preview2" job: typecheck_test env: RANDOMIZE_STDLIB_TEST_ORDER: "true" @@ -74,7 +74,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.4', head] + ruby: ['4.0.0-preview2', head] steps: - uses: actions/checkout@v6 - name: Install dependencies diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 4068cd23b..109becfd1 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler: none - name: Set working directory as safe run: git config --global --add safe.directory $(pwd) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e5110cdc8..e313060d0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.2', '3.3', ucrt, mswin] + ruby: ['3.4', ucrt, mswin] steps: - uses: actions/checkout@v6 - name: load ruby diff --git a/Gemfile b/Gemfile index 9cef14ea8..7c9b389ae 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,7 @@ gem "fileutils" gem "raap" gem "activesupport", "~> 7.0" gem "extconf_compile_commands_json" +gem "irb" group :libs do # Libraries required for stdlib test @@ -30,7 +31,6 @@ group :libs do gem "dbm" gem "mutex_m" gem "nkf" - gem "pathname" end group :profilers do diff --git a/Gemfile.lock b/Gemfile.lock index 403496147..890e0489a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,9 +43,7 @@ GEM drb (2.2.3) erb (6.0.0) extconf_compile_commands_json (0.0.7) - ffi (1.17.2-aarch64-linux-gnu) - ffi (1.17.2-arm64-darwin) - ffi (1.17.2-x86_64-linux-gnu) + ffi (1.17.2) fileutils (1.8.0) goodcheck (3.1.0) marcel (>= 1.0, < 2.0) @@ -54,6 +52,11 @@ GEM strong_json (>= 1.1, < 2.2) i18n (1.14.7) concurrent-ruby (~> 1.0) + io-console (0.8.1) + irb (1.15.3) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) json (2.16.0) json-schema (6.0.0) addressable (~> 2.8) @@ -66,6 +69,7 @@ GEM logger (1.7.0) marcel (1.1.0) memory_profiler (1.1.0) + mini_portile2 (2.8.9) minitest (5.26.2) mutex_m (0.3.0) net-protocol (0.2.2) @@ -73,19 +77,18 @@ GEM net-smtp (0.5.1) net-protocol nkf (0.2.0) - nokogiri (1.18.10-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.10-arm64-darwin) - racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.18.10) + mini_portile2 (~> 2.8.2) racc (~> 1.4) ostruct (0.6.3) parallel (1.27.0) parser (3.3.10.0) ast (~> 2.4.1) racc - pathname (0.4.0) power_assert (3.0.1) + pp (0.6.3) + prettyprint + prettyprint (0.2.0) prism (1.6.0) pstore (0.2.0) psych (4.0.6) @@ -107,6 +110,8 @@ GEM psych (>= 4.0.0) tsort regexp_parser (2.11.3) + reline (0.6.3) + io-console (~> 0.5) rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -183,9 +188,7 @@ GEM zlib (3.2.2) PLATFORMS - aarch64-linux - arm64-darwin - x86_64-linux + ruby DEPENDENCIES abbrev @@ -199,6 +202,7 @@ DEPENDENCIES extconf_compile_commands_json fileutils goodcheck + irb json json-schema memory_profiler @@ -207,7 +211,6 @@ DEPENDENCIES net-smtp nkf ostruct - pathname pstore raap rake @@ -226,4 +229,4 @@ DEPENDENCIES test-unit BUNDLED WITH - 2.6.3 + 4.0.0.dev diff --git a/Rakefile b/Rakefile index 330530a24..5e43b2cec 100644 --- a/Rakefile +++ b/Rakefile @@ -212,7 +212,14 @@ task :validate => :compile do end libs.each do |lib| - sh "#{ruby} #{rbs} -r #{lib} validate --exit-error-on-syntax-error" + args = ["-r", lib] + + if lib == "rbs" + args << "-r" + args << "prism" + end + + sh "#{ruby} #{rbs} #{args.join(' ')} validate --exit-error-on-syntax-error" end end diff --git a/bin/benchmark-parse.rb b/bin/benchmark-parse.rb index 98e4ce16d..64d4fd530 100644 --- a/bin/benchmark-parse.rb +++ b/bin/benchmark-parse.rb @@ -1,7 +1,6 @@ require "rbs" require "benchmark/ips" require "csv" -require "pathname" files = {} ARGV.each do |file| diff --git a/lib/rbs.rb b/lib/rbs.rb index b4a8b6aa5..197d5f703 100644 --- a/lib/rbs.rb +++ b/lib/rbs.rb @@ -4,7 +4,7 @@ require "set" require "json" -require "pathname" +require "pathname" unless defined?(Pathname) require "pp" require "ripper" require "logger" diff --git a/steep/Gemfile.lock b/steep/Gemfile.lock index abfe87181..b9873e283 100644 --- a/steep/Gemfile.lock +++ b/steep/Gemfile.lock @@ -89,4 +89,4 @@ DEPENDENCIES test-unit BUNDLED WITH - 2.6.3 + 4.0.0.dev diff --git a/test/stdlib/Marshal_test.rb b/test/stdlib/Marshal_test.rb index 945ffa78a..f0d03fa0f 100644 --- a/test/stdlib/Marshal_test.rb +++ b/test/stdlib/Marshal_test.rb @@ -1,5 +1,4 @@ require_relative "test_helper" -require "pathname" require "tmpdir" class MarshalSingletonTest < Test::Unit::TestCase diff --git a/test/stdlib/zlib/GzipReader_test.rb b/test/stdlib/zlib/GzipReader_test.rb index d105a797c..6d2e288b6 100644 --- a/test/stdlib/zlib/GzipReader_test.rb +++ b/test/stdlib/zlib/GzipReader_test.rb @@ -1,7 +1,6 @@ require_relative "../test_helper" require "zlib" require "tempfile" -require "pathname" class ZlibGzipReaderSingletonTest < Test::Unit::TestCase include TestHelper