From 78d037a5d979145654d4b281c4be5ce83d2f2ad9 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Mon, 24 Mar 2025 10:00:42 +0900 Subject: [PATCH 01/14] Skip loading ruby_memcheck --- Rakefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 77e9d6521..59f4b4bb7 100644 --- a/Rakefile +++ b/Rakefile @@ -22,10 +22,14 @@ end Rake::TestTask.new(test: :compile, &test_config) unless Gem.win_platform? - require "ruby_memcheck" + begin + require "ruby_memcheck" - namespace :test do - RubyMemcheck::TestTask.new(valgrind: :compile, &test_config) + namespace :test do + RubyMemcheck::TestTask.new(valgrind: :compile, &test_config) + end + rescue LoadError => exn + STDERR.puts "🚨🚨🚨🚨 Skipping RubyMemcheck: #{exn.inspect} 🚨🚨🚨🚨" end end From 6e9facd794bf8674672dc4e4d5417f49e4bbcb65 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Mon, 24 Mar 2025 10:43:46 +0900 Subject: [PATCH 02/14] Add --force so that `did_you_mean` is a default gem --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e93adf27e..75aa8a716 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,7 +33,7 @@ jobs: res = URI.parse("https://stdgems.org/bundled_gems.json").read bundled_gems = JSON.parse(res)["gems"].map{_1["gem"]} - system "gem uninstall #{bundled_gems.join(" ")}", exception: true + system "gem uninstall --force #{bundled_gems.join(" ")}", exception: true ' - name: bundle install run: | From 0f89f84c8a03f7be4cc4323e246ead5492ed89c2 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Mon, 24 Mar 2025 12:47:04 +0900 Subject: [PATCH 03/14] Version 3.9.1 --- CHANGELOG.md | 7 +++++++ Gemfile.lock | 2 +- lib/rbs/version.rb | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a674f168a..5272aa987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## 3.9.1 (2025-03-24) + +### Miscellaneous + +* `did_you_mean` is a default gem ([#2348](https://github.com/ruby/rbs/pull/2348)) +* Skip loading ruby_memcheck ([#2347](https://github.com/ruby/rbs/pull/2347)) + ## 3.9.0 (2025-03-18) ### Miscellaneous diff --git a/Gemfile.lock b/Gemfile.lock index c51c96159..d87b90d86 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rbs (3.9.0) + rbs (3.9.1) logger PATH diff --git a/lib/rbs/version.rb b/lib/rbs/version.rb index 1b6c4459a..451ccc912 100644 --- a/lib/rbs/version.rb +++ b/lib/rbs/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RBS - VERSION = "3.9.0" + VERSION = "3.9.1" end From 8bf0aa744bc357ec84f1ab491400b7a137879def Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Mon, 24 Mar 2025 17:35:32 +0900 Subject: [PATCH 04/14] Change `{}` to `{ 0 }` --- ext/rbs_extension/parserstate.c | 2 +- src/util/rbs_constant_pool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/rbs_extension/parserstate.c b/ext/rbs_extension/parserstate.c index 98e5773fc..d252eb54b 100644 --- a/ext/rbs_extension/parserstate.c +++ b/ext/rbs_extension/parserstate.c @@ -334,7 +334,7 @@ parserstate *alloc_parser(VALUE buffer, lexstate *lexer, int start_pos, int end_ .vars = NULL, .last_comment = NULL, - .constant_pool = {}, + .constant_pool = { 0 }, }; // The parser's constant pool is mainly used for storing the names of type variables, which usually aren't many. diff --git a/src/util/rbs_constant_pool.c b/src/util/rbs_constant_pool.c index 406c36464..96f9246f3 100644 --- a/src/util/rbs_constant_pool.c +++ b/src/util/rbs_constant_pool.c @@ -169,7 +169,7 @@ rbs_constant_pool_resize(rbs_constant_pool_t *pool) { } // This storage is initialized by `Init_rbs_extension()` in `main.c`. -static rbs_constant_pool_t RBS_GLOBAL_CONSTANT_POOL_STORAGE = {}; +static rbs_constant_pool_t RBS_GLOBAL_CONSTANT_POOL_STORAGE = { 0 }; rbs_constant_pool_t *RBS_GLOBAL_CONSTANT_POOL = &RBS_GLOBAL_CONSTANT_POOL_STORAGE; /** From d373277184a62a23e7545e60e9b409509b0144de Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Mon, 31 Mar 2025 13:05:47 +0900 Subject: [PATCH 05/14] Version 3.9.2 --- CHANGELOG.md | 6 ++++++ Gemfile.lock | 2 +- lib/rbs/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5272aa987..d4b602b13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 3.9.2 (2025-03-31) + +### Library changes + +* Change `{}` to `{ 0 }` ([#2354](https://github.com/ruby/rbs/pull/2354)) + ## 3.9.1 (2025-03-24) ### Miscellaneous diff --git a/Gemfile.lock b/Gemfile.lock index d87b90d86..c14df1b11 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rbs (3.9.1) + rbs (3.9.2) logger PATH diff --git a/lib/rbs/version.rb b/lib/rbs/version.rb index 451ccc912..c66692382 100644 --- a/lib/rbs/version.rb +++ b/lib/rbs/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RBS - VERSION = "3.9.1" + VERSION = "3.9.2" end From c6328f161e1c9523e5a700b3a6f1f477059f8dd3 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 1 May 2025 10:52:02 +0800 Subject: [PATCH 06/14] Use erb instead of set for load path testing --- test/stdlib/global_variables_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/stdlib/global_variables_test.rb b/test/stdlib/global_variables_test.rb index 4b06824e4..da06ec531 100644 --- a/test/stdlib/global_variables_test.rb +++ b/test/stdlib/global_variables_test.rb @@ -262,7 +262,7 @@ def test_gvar_LOAD_PATH(gvar: :$LOAD_PATH) # is a singleton method), we can't use `assert_send_type` and must use `assert_type`. loadpath = eval(gvar.to_s) - with_path 'set' do |path| + with_path 'erb' do |path| assert_type '[:rb | :so, String]', loadpath.resolve_feature_path(path) end From ff00897cad6dec6c36ed9d58336d540b9e246a8e Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 9 May 2025 16:34:23 +0900 Subject: [PATCH 07/14] bundle update --- Gemfile | 4 +-- Gemfile.lock | 70 +++++++++++++++++++++++++--------------------- steep/Gemfile.lock | 22 +++++++-------- 3 files changed, 51 insertions(+), 45 deletions(-) diff --git a/Gemfile b/Gemfile index 095664ffa..9c08849cc 100644 --- a/Gemfile +++ b/Gemfile @@ -11,12 +11,12 @@ gem "rspec" gem "rubocop" gem "rubocop-rubycw" gem "rubocop-on-rbs" -gem "json" +gem "json", "~> 2.10.2" gem "json-schema" gem "goodcheck" gem 'digest' gem 'tempfile' -gem "rdoc" +gem "rdoc", "~> 6.11.0" gem "fileutils" gem "raap" gem "activesupport", "~> 7.0" diff --git a/Gemfile.lock b/Gemfile.lock index c14df1b11..f80bff45e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,19 +27,19 @@ GEM tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) - ast (2.4.2) + ast (2.4.3) base64 (0.2.0) benchmark (0.4.0) benchmark-ips (2.14.0) bigdecimal (3.1.9) concurrent-ruby (1.3.5) - connection_pool (2.5.0) - csv (3.3.2) + connection_pool (2.5.3) + csv (3.3.4) dbm (1.1.0) - diff-lcs (1.6.0) + diff-lcs (1.6.1) digest (3.2.0) drb (2.2.1) - ffi (1.17.1) + ffi (1.17.2) fileutils (1.7.3) goodcheck (3.1.0) marcel (>= 1.0, < 2.0) @@ -57,7 +57,7 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.6) + logger (1.7.0) marcel (1.0.4) memory_profiler (1.1.0) mini_portile2 (2.8.8) @@ -68,27 +68,28 @@ GEM net-smtp (0.5.1) net-protocol nkf (0.2.0) - nokogiri (1.18.4) + nokogiri (1.18.8) mini_portile2 (~> 2.8.2) racc (~> 1.4) ostruct (0.6.1) - parallel (1.26.3) - parser (3.3.7.1) + parallel (1.27.0) + parser (3.3.8.0) ast (~> 2.4.1) racc pathname (0.4.0) power_assert (2.0.5) + prism (1.4.0) pstore (0.2.0) psych (4.0.6) stringio - public_suffix (6.0.1) + public_suffix (6.0.2) raap (1.2.0) rbs (~> 3.0) timeout (~> 0.4) racc (1.8.1) rainbow (3.1.1) rake (13.2.1) - rake-compiler (1.2.9) + rake-compiler (1.3.0) rake rb-fsevent (0.11.2) rb-inotify (0.11.1) @@ -102,14 +103,14 @@ GEM rspec-mocks (~> 3.13.0) rspec-core (3.13.3) rspec-support (~> 3.13.0) - rspec-expectations (3.13.3) + rspec-expectations (3.13.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.2) + rspec-mocks (3.13.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.2) - rubocop (1.74.0) + rspec-support (3.13.3) + rubocop (1.75.5) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -117,14 +118,16 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.38.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.1) - parser (>= 3.3.1.0) - rubocop-on-rbs (1.4.2) + rubocop-ast (1.44.1) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-on-rbs (1.6.0) + lint_roller (~> 1.1) rbs (~> 3.5) - rubocop (~> 1.61) + rubocop (>= 1.72.1, < 2.0) zlib rubocop-rubycw (0.2.2) lint_roller (~> 1.1) @@ -134,34 +137,37 @@ GEM nokogiri securerandom (0.4.1) stackprof (0.2.27) - steep (1.9.4) + steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) csv (>= 3.0.9) fileutils (>= 1.1.0) json (>= 2.1.0) - language_server-protocol (>= 3.15, < 4.0) + language_server-protocol (>= 3.17.0.4, < 4.0) listen (~> 3.0) logger (>= 1.3.0) + mutex_m (>= 0.3.0) parser (>= 3.1) rainbow (>= 2.2.2, < 4.0) - rbs (~> 3.8) + rbs (~> 3.9) securerandom (>= 0.1) strscan (>= 1.0.0) - terminal-table (>= 2, < 4) + terminal-table (>= 2, < 5) uri (>= 0.12.0) - stringio (3.1.5) + stringio (3.1.7) strong_json (2.1.2) - strscan (3.1.2) + strscan (3.1.5) tempfile (0.3.1) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - test-unit (3.6.7) + terminal-table (4.0.0) + unicode-display_width (>= 1.1.1, < 4) + test-unit (3.6.8) power_assert timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.6.0) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) uri (1.0.3) zlib (3.2.1) @@ -179,7 +185,7 @@ DEPENDENCIES digest fileutils goodcheck - json + json (~> 2.10.2) json-schema memory_profiler minitest @@ -194,7 +200,7 @@ DEPENDENCIES rake-compiler rbs! rbs-amber! - rdoc + rdoc (~> 6.11.0) rspec rubocop rubocop-on-rbs diff --git a/steep/Gemfile.lock b/steep/Gemfile.lock index ee0fcae8a..4ca31fc47 100644 --- a/steep/Gemfile.lock +++ b/steep/Gemfile.lock @@ -14,27 +14,27 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - ast (2.4.2) + ast (2.4.3) base64 (0.2.0) benchmark (0.4.0) bigdecimal (3.1.9) concurrent-ruby (1.3.5) - connection_pool (2.5.0) - csv (3.3.2) + connection_pool (2.5.3) + csv (3.3.4) drb (2.2.1) - ffi (1.17.1) + ffi (1.17.2) fileutils (1.7.3) i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.10.2) + json (2.11.3) language_server-protocol (3.17.0.4) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.6) + logger (1.7.0) minitest (5.25.5) mutex_m (0.3.0) - parser (3.3.7.1) + parser (3.3.8.0) ast (~> 2.4.1) racc racc (1.8.1) @@ -42,10 +42,10 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rbs (3.9.0.pre.2) + rbs (3.9.2) logger securerandom (0.4.1) - steep (1.10.0.pre.3) + steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) csv (>= 3.0.9) @@ -57,12 +57,12 @@ GEM mutex_m (>= 0.3.0) parser (>= 3.1) rainbow (>= 2.2.2, < 4.0) - rbs (~> 3.9.pre) + rbs (~> 3.9) securerandom (>= 0.1) strscan (>= 1.0.0) terminal-table (>= 2, < 5) uri (>= 0.12.0) - strscan (3.1.2) + strscan (3.1.5) terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) tzinfo (2.0.6) From deabcb7e0ea36edda5a4f7067a1e3bccc4a003a7 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 9 May 2025 16:49:50 +0900 Subject: [PATCH 08/14] Version 3.9.3 --- CHANGELOG.md | 6 ++++++ Gemfile.lock | 2 +- lib/rbs/version.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4b602b13..4298bc95b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 3.9.3 (2025-05-09) + +### Miscellaneous + +* Use erb instead of set for load path testing ([#2468](https://github.com/ruby/rbs/pull/2468)) + ## 3.9.2 (2025-03-31) ### Library changes diff --git a/Gemfile.lock b/Gemfile.lock index f80bff45e..18dd6e122 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rbs (3.9.2) + rbs (3.9.3) logger PATH diff --git a/lib/rbs/version.rb b/lib/rbs/version.rb index c66692382..f8b544d00 100644 --- a/lib/rbs/version.rb +++ b/lib/rbs/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RBS - VERSION = "3.9.2" + VERSION = "3.9.3" end From 60cde3314e1efe5bce3a65b20ef8f791e2d37b65 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Thu, 15 May 2025 13:26:05 +0900 Subject: [PATCH 09/14] Merge pull request #2484 from ruby/supers --- test/stdlib/CGI_test.rb | 1 + test/stdlib/Forwardable_test.rb | 1 + test/stdlib/Minitest_test.rb | 3 ++- test/stdlib/uri/rfc2396_parser_test.rb | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/stdlib/CGI_test.rb b/test/stdlib/CGI_test.rb index ddcfefc7b..c88b05b2c 100644 --- a/test/stdlib/CGI_test.rb +++ b/test/stdlib/CGI_test.rb @@ -68,6 +68,7 @@ class CGITest < Test::Unit::TestCase testing "::CGI" def setup + super ARGV.replace(%w(abc=001 def=002)) end diff --git a/test/stdlib/Forwardable_test.rb b/test/stdlib/Forwardable_test.rb index 755e8c843..e92e1f1e6 100644 --- a/test/stdlib/Forwardable_test.rb +++ b/test/stdlib/Forwardable_test.rb @@ -71,6 +71,7 @@ class SingleForwardableTest < Test::Unit::TestCase testing "::SingleForwardable" def setup + super @tested = Object.new @tested.extend SingleForwardable end diff --git a/test/stdlib/Minitest_test.rb b/test/stdlib/Minitest_test.rb index 34c2fc6c4..f8c1cb511 100644 --- a/test/stdlib/Minitest_test.rb +++ b/test/stdlib/Minitest_test.rb @@ -51,9 +51,10 @@ class MinitestTestLifecycleHooksTest < Test::Unit::TestCase class LifecycleSetup < Minitest::Test def setup + super @foo = 123 end - end + end def test_setup_return_type_void test = LifecycleSetup.new("setup") diff --git a/test/stdlib/uri/rfc2396_parser_test.rb b/test/stdlib/uri/rfc2396_parser_test.rb index 3e6f35a05..215eecd34 100644 --- a/test/stdlib/uri/rfc2396_parser_test.rb +++ b/test/stdlib/uri/rfc2396_parser_test.rb @@ -20,6 +20,7 @@ class URIRFC2396_ParserInstanceTest < Test::Unit::TestCase testing "::URI::RFC2396_Parser" def setup + super @instance = URI::RFC2396_Parser.new end From c33ce1d3f917b86a8296378509d7cd4e15eba1d1 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Thu, 15 May 2025 11:57:22 +0900 Subject: [PATCH 10/14] Merge pull request #2485 from ruby/fix-ci Skip permission setup --- .github/workflows/ruby.yml | 4 ---- .github/workflows/typecheck.yml | 2 -- test/stdlib/Ractor_test.rb | 4 ++++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index acd9bf63a..ede0364e1 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -44,8 +44,6 @@ jobs: bundler: none - name: Set working directory as safe run: git config --global --add safe.directory $(pwd) - - name: Set up permission - run: chmod -R o-w /opt/hostedtoolcache/Ruby - name: Install dependencies run: | sudo apt-get update @@ -90,8 +88,6 @@ jobs: bundler-cache: none - name: Set working directory as safe run: git config --global --add safe.directory $(pwd) - - name: Set up permission - run: chmod -R o-w /opt/hostedtoolcache/Ruby - name: Install dependencies run: | sudo apt-get update diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 0afc49b99..5f737028a 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -20,8 +20,6 @@ jobs: bundler: none - name: Set working directory as safe run: git config --global --add safe.directory $(pwd) - - name: Set up permission - run: chmod -R o-w /opt/hostedtoolcache/Ruby - name: Install dependencies run: | sudo apt-get update diff --git a/test/stdlib/Ractor_test.rb b/test/stdlib/Ractor_test.rb index 9ed177c17..f2d0897db 100644 --- a/test/stdlib/Ractor_test.rb +++ b/test/stdlib/Ractor_test.rb @@ -132,6 +132,8 @@ class RactorInstanceTest < Test::Unit::TestCase testing "::Ractor" def test_aref + omit "Accessing ractor local storage" if RUBY_VERSION >= "3.5" + r = Ractor.new {} r['foo'] = 'bar' assert_send_type "(String) -> untyped", @@ -141,6 +143,8 @@ def test_aref end def test_aset + omit "Accessing ractor local storage" if RUBY_VERSION >= "3.5" + r = Ractor.new {} assert_send_type "(String, String) -> String", r, :[]=, 'foo', 'bar' From 46ebacb27e2e065124365bd9df76b93f43269dbb Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Thu, 15 May 2025 16:31:16 +0900 Subject: [PATCH 11/14] Version 3.9.4 --- CHANGELOG.md | 7 +++++++ Gemfile.lock | 2 +- lib/rbs/version.rb | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4298bc95b..c40407962 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## 3.9.4 (2025-05-15) + +### Miscellaneous + +* Backport test/CI fixes to 3.9 ([#2487](https://github.com/ruby/rbs/pull/2487)) +* Use erb instead of set for load path testing ([#2468](https://github.com/ruby/rbs/pull/2468)) + ## 3.9.3 (2025-05-09) ### Miscellaneous diff --git a/Gemfile.lock b/Gemfile.lock index 18dd6e122..abb63d55f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rbs (3.9.3) + rbs (3.9.4) logger PATH diff --git a/lib/rbs/version.rb b/lib/rbs/version.rb index f8b544d00..0a90c854b 100644 --- a/lib/rbs/version.rb +++ b/lib/rbs/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RBS - VERSION = "3.9.3" + VERSION = "3.9.4" end From 3392bc599566a35235f4090e6faab8ed349e3ffd Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Thu, 14 Aug 2025 05:00:02 +0000 Subject: [PATCH 12/14] Merge pull request #2612 from nobu/skip_tests-files Allows the use of a path list as RBS_SKIP_TESTS --- test/test_skip.rb | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/test/test_skip.rb b/test/test_skip.rb index 2fbd7b92f..5fa96b562 100644 --- a/test/test_skip.rb +++ b/test/test_skip.rb @@ -15,15 +15,11 @@ # ``` # module TestSkip - env = ENV["RBS_SKIP_TESTS"] - SKIP_TESTS_FILE = - if env - Pathname(env) - end + SKIP_TESTS_FILES = ENV["RBS_SKIP_TESTS"]&.split(File::PATH_SEPARATOR) SKIP_TESTS = - if SKIP_TESTS_FILE - SKIP_TESTS_FILE.each_line.with_object({}) do |line, hash| + SKIP_TESTS_FILES&.each_with_object({}) do |file, hash| + File.foreach(file) do |line| line.chomp! line.gsub!(/#.*/, "") line.strip! @@ -32,7 +28,7 @@ module TestSkip name, message = line.split(/\s+/, 2) - hash[name] = message + hash[name] = [file, message] end end @@ -40,11 +36,12 @@ module TestSkip def setup super - if SKIP_TESTS.key?(name) || SKIP_TESTS.key?(self.class.name) - if message = SKIP_TESTS[name] || SKIP_TESTS[self.class.name] - omit "Skip test by RBS_SKIP_TESTS(#{SKIP_TESTS_FILE}): #{message}" + file, message = SKIP_TESTS[name] || SKIP_TESTS[self.class.name] + if file + if message + omit "Skip test by RBS_SKIP_TESTS(#{file}): #{message}" else - omit "Skip test by RBS_SKIP_TESTS(#{SKIP_TESTS_FILE})" + omit "Skip test by RBS_SKIP_TESTS(#{file})" end end end @@ -54,7 +51,7 @@ def teardown when passed? # nop else - puts "💡You can skip this test `#{name}` by adding the name to `#{SKIP_TESTS_FILE}`" + puts "💡You can skip this test `#{name}` by adding the name to `#{SKIP_TESTS_FILES.join('`, `')}`" end super From 49edf977cedc007efe37e0efb0efcd8084c13776 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 15 Aug 2025 12:45:12 +0900 Subject: [PATCH 13/14] =?UTF-8?q?`require=20=E2=80=98fileutils=E2=80=99`?= =?UTF-8?q?=20explicitly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/rbs/collection.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rbs/collection.rb b/lib/rbs/collection.rb index f1a76bc39..1e00aeef5 100644 --- a/lib/rbs/collection.rb +++ b/lib/rbs/collection.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'yaml' +require 'fileutils' require_relative './cli/colored_io' require_relative './collection/sources' From 368bf4b1ab52a9335e2022618ac4545a4d9cacdf Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 4 Apr 2025 14:29:48 +0900 Subject: [PATCH 14/14] Suppress to GCC warning with multi-line comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` main.c: In function ‘Init_rbs_extension’: main.c:24:3: warning: multi-line comment [-Wcomment] 24 | // grep -o 'INTERN("\([^"]*\)")' ext/rbs_extension/parser.c \ | ^ ``` --- ext/rbs_extension/main.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ext/rbs_extension/main.c b/ext/rbs_extension/main.c index 227ea3b5b..d0b4a3619 100644 --- a/ext/rbs_extension/main.c +++ b/ext/rbs_extension/main.c @@ -18,14 +18,15 @@ Init_rbs_extension(void) rbs__init_location(); rbs__init_parser(); - // Calculated based on the number of unique strings used with the `INTERN` macro in `parser.c`. - // - // ```bash - // grep -o 'INTERN("\([^"]*\)")' ext/rbs_extension/parser.c \ - // | sed 's/INTERN("\(.*\)")/\1/' \ - // | sort -u \ - // | wc -l - // ``` + /* Calculated based on the number of unique strings used with the `INTERN` macro in `parser.c`. + * + * ```bash + * grep -o 'INTERN("\([^"]*\)")' ext/rbs_extension/parser.c \ + * | sed 's/INTERN("\(.*\)")/\1/' \ + * | sort -u \ + * | wc -l + * ``` + */ const size_t num_uniquely_interned_strings = 26; rbs_constant_pool_init(RBS_GLOBAL_CONSTANT_POOL, num_uniquely_interned_strings);