rbs 4.0.0.dev.4 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +14 -14
  3. data/.github/workflows/bundle-update.yml +60 -0
  4. data/.github/workflows/c-check.yml +18 -11
  5. data/.github/workflows/comments.yml +5 -3
  6. data/.github/workflows/dependabot.yml +2 -2
  7. data/.github/workflows/ruby.yml +27 -34
  8. data/.github/workflows/rust.yml +95 -0
  9. data/.github/workflows/typecheck.yml +2 -2
  10. data/.github/workflows/windows.yml +2 -2
  11. data/.rubocop.yml +1 -1
  12. data/CHANGELOG.md +323 -0
  13. data/README.md +1 -1
  14. data/Rakefile +43 -33
  15. data/Steepfile +1 -0
  16. data/config.yml +426 -24
  17. data/core/array.rbs +307 -227
  18. data/core/basic_object.rbs +9 -8
  19. data/core/binding.rbs +0 -2
  20. data/core/builtin.rbs +2 -2
  21. data/core/class.rbs +6 -5
  22. data/core/comparable.rbs +55 -34
  23. data/core/complex.rbs +104 -78
  24. data/core/dir.rbs +61 -49
  25. data/core/encoding.rbs +12 -15
  26. data/core/enumerable.rbs +179 -87
  27. data/core/enumerator/arithmetic_sequence.rbs +70 -0
  28. data/core/enumerator.rbs +65 -2
  29. data/core/errno.rbs +11 -2
  30. data/core/errors.rbs +58 -29
  31. data/core/exception.rbs +13 -13
  32. data/core/fiber.rbs +74 -54
  33. data/core/file.rbs +280 -177
  34. data/core/file_test.rbs +3 -3
  35. data/core/float.rbs +257 -92
  36. data/core/gc.rbs +425 -281
  37. data/core/hash.rbs +1045 -739
  38. data/core/integer.rbs +135 -137
  39. data/core/io/buffer.rbs +53 -42
  40. data/core/io/wait.rbs +13 -35
  41. data/core/io.rbs +192 -144
  42. data/core/kernel.rbs +216 -155
  43. data/core/marshal.rbs +4 -4
  44. data/core/match_data.rbs +15 -13
  45. data/core/math.rbs +107 -66
  46. data/core/method.rbs +69 -33
  47. data/core/module.rbs +244 -106
  48. data/core/nil_class.rbs +7 -6
  49. data/core/numeric.rbs +74 -63
  50. data/core/object.rbs +9 -11
  51. data/core/object_space.rbs +30 -23
  52. data/core/pathname.rbs +1322 -0
  53. data/core/proc.rbs +95 -58
  54. data/core/process.rbs +222 -202
  55. data/core/ractor.rbs +371 -515
  56. data/core/random.rbs +21 -3
  57. data/core/range.rbs +159 -57
  58. data/core/rational.rbs +60 -89
  59. data/core/rbs/unnamed/argf.rbs +60 -53
  60. data/core/rbs/unnamed/env_class.rbs +19 -14
  61. data/core/rbs/unnamed/main_class.rbs +123 -0
  62. data/core/rbs/unnamed/random.rbs +11 -118
  63. data/core/regexp.rbs +258 -214
  64. data/core/ruby.rbs +53 -0
  65. data/core/ruby_vm.rbs +38 -34
  66. data/core/rubygems/config_file.rbs +5 -5
  67. data/core/rubygems/errors.rbs +4 -71
  68. data/core/rubygems/requirement.rbs +5 -5
  69. data/core/rubygems/rubygems.rbs +16 -82
  70. data/core/rubygems/version.rbs +2 -3
  71. data/core/set.rbs +490 -360
  72. data/core/signal.rbs +26 -16
  73. data/core/string.rbs +3234 -1285
  74. data/core/struct.rbs +27 -26
  75. data/core/symbol.rbs +41 -34
  76. data/core/thread.rbs +135 -67
  77. data/core/time.rbs +81 -50
  78. data/core/trace_point.rbs +41 -35
  79. data/core/true_class.rbs +2 -2
  80. data/core/unbound_method.rbs +24 -16
  81. data/core/warning.rbs +7 -7
  82. data/docs/aliases.md +79 -0
  83. data/docs/collection.md +3 -3
  84. data/docs/config.md +171 -0
  85. data/docs/encoding.md +56 -0
  86. data/docs/gem.md +0 -1
  87. data/docs/inline.md +576 -0
  88. data/docs/sigs.md +3 -3
  89. data/docs/syntax.md +46 -16
  90. data/docs/type_fingerprint.md +21 -0
  91. data/exe/rbs +1 -1
  92. data/ext/rbs_extension/ast_translation.c +544 -116
  93. data/ext/rbs_extension/ast_translation.h +3 -0
  94. data/ext/rbs_extension/class_constants.c +16 -2
  95. data/ext/rbs_extension/class_constants.h +8 -0
  96. data/ext/rbs_extension/extconf.rb +5 -1
  97. data/ext/rbs_extension/legacy_location.c +33 -56
  98. data/ext/rbs_extension/legacy_location.h +37 -0
  99. data/ext/rbs_extension/main.c +44 -35
  100. data/include/rbs/ast.h +448 -173
  101. data/include/rbs/defines.h +27 -0
  102. data/include/rbs/lexer.h +30 -11
  103. data/include/rbs/location.h +25 -44
  104. data/include/rbs/parser.h +6 -6
  105. data/include/rbs/string.h +0 -2
  106. data/include/rbs/util/rbs_allocator.h +34 -13
  107. data/include/rbs/util/rbs_assert.h +12 -1
  108. data/include/rbs/util/rbs_constant_pool.h +0 -3
  109. data/include/rbs/util/rbs_encoding.h +2 -0
  110. data/include/rbs/util/rbs_unescape.h +2 -1
  111. data/include/rbs.h +8 -0
  112. data/lib/rbs/ast/annotation.rb +1 -1
  113. data/lib/rbs/ast/comment.rb +1 -1
  114. data/lib/rbs/ast/declarations.rb +10 -10
  115. data/lib/rbs/ast/members.rb +14 -14
  116. data/lib/rbs/ast/ruby/annotations.rb +293 -3
  117. data/lib/rbs/ast/ruby/comment_block.rb +24 -0
  118. data/lib/rbs/ast/ruby/declarations.rb +198 -3
  119. data/lib/rbs/ast/ruby/helpers/constant_helper.rb +4 -0
  120. data/lib/rbs/ast/ruby/members.rb +532 -22
  121. data/lib/rbs/ast/type_param.rb +24 -4
  122. data/lib/rbs/buffer.rb +20 -15
  123. data/lib/rbs/cli/diff.rb +16 -15
  124. data/lib/rbs/cli/validate.rb +38 -106
  125. data/lib/rbs/cli.rb +52 -19
  126. data/lib/rbs/collection/config/lockfile_generator.rb +14 -2
  127. data/lib/rbs/collection/sources/git.rb +1 -0
  128. data/lib/rbs/definition.rb +1 -1
  129. data/lib/rbs/definition_builder/ancestor_builder.rb +62 -9
  130. data/lib/rbs/definition_builder/method_builder.rb +20 -0
  131. data/lib/rbs/definition_builder.rb +147 -25
  132. data/lib/rbs/diff.rb +7 -1
  133. data/lib/rbs/environment.rb +227 -74
  134. data/lib/rbs/environment_loader.rb +0 -6
  135. data/lib/rbs/errors.rb +27 -18
  136. data/lib/rbs/inline_parser.rb +342 -6
  137. data/lib/rbs/location_aux.rb +1 -1
  138. data/lib/rbs/locator.rb +5 -1
  139. data/lib/rbs/method_type.rb +5 -3
  140. data/lib/rbs/parser_aux.rb +20 -7
  141. data/lib/rbs/prototype/helpers.rb +57 -0
  142. data/lib/rbs/prototype/rb.rb +3 -28
  143. data/lib/rbs/prototype/rbi.rb +3 -20
  144. data/lib/rbs/prototype/runtime.rb +8 -0
  145. data/lib/rbs/resolver/constant_resolver.rb +2 -2
  146. data/lib/rbs/resolver/type_name_resolver.rb +116 -38
  147. data/lib/rbs/subtractor.rb +3 -1
  148. data/lib/rbs/test/type_check.rb +19 -2
  149. data/lib/rbs/type_name.rb +1 -1
  150. data/lib/rbs/types.rb +88 -78
  151. data/lib/rbs/unit_test/type_assertions.rb +35 -8
  152. data/lib/rbs/validator.rb +2 -2
  153. data/lib/rbs/version.rb +1 -1
  154. data/lib/rbs.rb +1 -2
  155. data/lib/rdoc/discover.rb +1 -1
  156. data/lib/rdoc_plugin/parser.rb +1 -1
  157. data/rbs.gemspec +4 -3
  158. data/rust/.gitignore +1 -0
  159. data/rust/Cargo.lock +378 -0
  160. data/rust/Cargo.toml +7 -0
  161. data/rust/ruby-rbs/Cargo.toml +22 -0
  162. data/rust/ruby-rbs/build.rs +764 -0
  163. data/rust/ruby-rbs/examples/locations.rs +60 -0
  164. data/rust/ruby-rbs/src/lib.rs +1 -0
  165. data/rust/ruby-rbs/src/node/mod.rs +742 -0
  166. data/rust/ruby-rbs/tests/sanity.rs +47 -0
  167. data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
  168. data/rust/ruby-rbs-sys/Cargo.toml +23 -0
  169. data/rust/ruby-rbs-sys/build.rs +204 -0
  170. data/rust/ruby-rbs-sys/src/lib.rs +50 -0
  171. data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
  172. data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
  173. data/rust/ruby-rbs-sys/wrapper.h +1 -0
  174. data/schema/typeParam.json +17 -1
  175. data/sig/ast/ruby/annotations.rbs +315 -4
  176. data/sig/ast/ruby/comment_block.rbs +8 -0
  177. data/sig/ast/ruby/declarations.rbs +102 -4
  178. data/sig/ast/ruby/members.rbs +108 -2
  179. data/sig/cli/diff.rbs +5 -11
  180. data/sig/cli/validate.rbs +12 -8
  181. data/sig/cli.rbs +18 -18
  182. data/sig/definition.rbs +6 -1
  183. data/sig/definition_builder.rbs +2 -0
  184. data/sig/environment.rbs +70 -12
  185. data/sig/errors.rbs +13 -14
  186. data/sig/inline_parser.rbs +39 -2
  187. data/sig/locator.rbs +0 -2
  188. data/sig/manifest.yaml +0 -1
  189. data/sig/method_builder.rbs +3 -1
  190. data/sig/parser.rbs +31 -13
  191. data/sig/prototype/helpers.rbs +2 -0
  192. data/sig/resolver/type_name_resolver.rbs +35 -7
  193. data/sig/source.rbs +3 -3
  194. data/sig/type_param.rbs +13 -8
  195. data/sig/types.rbs +6 -7
  196. data/sig/unit_test/spy.rbs +0 -8
  197. data/sig/unit_test/type_assertions.rbs +11 -0
  198. data/src/ast.c +410 -153
  199. data/src/lexer.c +1392 -1313
  200. data/src/lexer.re +3 -0
  201. data/src/lexstate.c +58 -37
  202. data/src/location.c +8 -48
  203. data/src/parser.c +977 -516
  204. data/src/string.c +0 -48
  205. data/src/util/rbs_allocator.c +89 -71
  206. data/src/util/rbs_assert.c +1 -1
  207. data/src/util/rbs_buffer.c +2 -2
  208. data/src/util/rbs_constant_pool.c +10 -14
  209. data/src/util/rbs_encoding.c +4 -8
  210. data/src/util/rbs_unescape.c +56 -20
  211. data/stdlib/bigdecimal/0/big_decimal.rbs +116 -98
  212. data/stdlib/bigdecimal-math/0/big_math.rbs +169 -8
  213. data/stdlib/cgi/0/core.rbs +9 -393
  214. data/stdlib/cgi/0/manifest.yaml +1 -0
  215. data/stdlib/cgi-escape/0/escape.rbs +171 -0
  216. data/stdlib/coverage/0/coverage.rbs +7 -4
  217. data/stdlib/date/0/date.rbs +92 -79
  218. data/stdlib/date/0/date_time.rbs +25 -24
  219. data/stdlib/delegate/0/delegator.rbs +10 -7
  220. data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
  221. data/stdlib/digest/0/digest.rbs +110 -0
  222. data/stdlib/erb/0/erb.rbs +748 -347
  223. data/stdlib/etc/0/etc.rbs +55 -50
  224. data/stdlib/fileutils/0/fileutils.rbs +158 -139
  225. data/stdlib/forwardable/0/forwardable.rbs +13 -10
  226. data/stdlib/io-console/0/io-console.rbs +2 -2
  227. data/stdlib/json/0/json.rbs +217 -136
  228. data/stdlib/monitor/0/monitor.rbs +3 -3
  229. data/stdlib/net-http/0/net-http.rbs +162 -134
  230. data/stdlib/objspace/0/objspace.rbs +17 -34
  231. data/stdlib/open-uri/0/open-uri.rbs +48 -8
  232. data/stdlib/open3/0/open3.rbs +469 -10
  233. data/stdlib/openssl/0/openssl.rbs +475 -357
  234. data/stdlib/optparse/0/optparse.rbs +26 -17
  235. data/stdlib/pathname/0/pathname.rbs +11 -1381
  236. data/stdlib/pp/0/pp.rbs +9 -8
  237. data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
  238. data/stdlib/pstore/0/pstore.rbs +35 -30
  239. data/stdlib/psych/0/psych.rbs +65 -12
  240. data/stdlib/psych/0/store.rbs +2 -4
  241. data/stdlib/pty/0/pty.rbs +9 -6
  242. data/stdlib/random-formatter/0/random-formatter.rbs +277 -0
  243. data/stdlib/rdoc/0/code_object.rbs +2 -1
  244. data/stdlib/rdoc/0/parser.rbs +1 -1
  245. data/stdlib/rdoc/0/rdoc.rbs +1 -1
  246. data/stdlib/rdoc/0/store.rbs +1 -1
  247. data/stdlib/resolv/0/resolv.rbs +25 -68
  248. data/stdlib/ripper/0/ripper.rbs +22 -19
  249. data/stdlib/securerandom/0/manifest.yaml +2 -0
  250. data/stdlib/securerandom/0/securerandom.rbs +7 -20
  251. data/stdlib/shellwords/0/shellwords.rbs +2 -2
  252. data/stdlib/singleton/0/singleton.rbs +3 -0
  253. data/stdlib/socket/0/addrinfo.rbs +7 -7
  254. data/stdlib/socket/0/basic_socket.rbs +3 -3
  255. data/stdlib/socket/0/ip_socket.rbs +10 -8
  256. data/stdlib/socket/0/socket.rbs +23 -10
  257. data/stdlib/socket/0/tcp_server.rbs +1 -1
  258. data/stdlib/socket/0/tcp_socket.rbs +11 -3
  259. data/stdlib/socket/0/udp_socket.rbs +1 -1
  260. data/stdlib/socket/0/unix_server.rbs +1 -1
  261. data/stdlib/stringio/0/stringio.rbs +1177 -85
  262. data/stdlib/strscan/0/string_scanner.rbs +27 -25
  263. data/stdlib/tempfile/0/tempfile.rbs +25 -21
  264. data/stdlib/time/0/time.rbs +8 -6
  265. data/stdlib/timeout/0/timeout.rbs +63 -7
  266. data/stdlib/tsort/0/cyclic.rbs +3 -0
  267. data/stdlib/tsort/0/tsort.rbs +7 -6
  268. data/stdlib/uri/0/common.rbs +42 -20
  269. data/stdlib/uri/0/file.rbs +3 -3
  270. data/stdlib/uri/0/generic.rbs +26 -18
  271. data/stdlib/uri/0/http.rbs +2 -2
  272. data/stdlib/uri/0/ldap.rbs +2 -2
  273. data/stdlib/uri/0/mailto.rbs +3 -3
  274. data/stdlib/uri/0/rfc2396_parser.rbs +12 -12
  275. data/stdlib/zlib/0/deflate.rbs +4 -3
  276. data/stdlib/zlib/0/gzip_reader.rbs +6 -6
  277. data/stdlib/zlib/0/gzip_writer.rbs +14 -12
  278. data/stdlib/zlib/0/inflate.rbs +1 -1
  279. data/stdlib/zlib/0/need_dict.rbs +1 -1
  280. data/stdlib/zlib/0/zstream.rbs +1 -0
  281. metadata +50 -6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,328 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 4.0.0 (2026-03-16)
4
+
5
+ RBS 4.0 ships with experimental RBS inline syntax support, allowing you to write type annotations directly in Ruby source files. See [docs/inline.md](docs/inline.md) for the syntax details.
6
+
7
+ ```ruby
8
+ class Calculator
9
+ # @rbs (Integer, Integer) -> Integer
10
+ def add(a, b) = a + b
11
+ end
12
+ ```
13
+
14
+ Note: RBS inline is still experimental and may change in future releases.
15
+
16
+ This release also introduces two language changes: type argument support for singleton types (`singleton(T)[S]`) mainly for Sorbet integration, and generic type parameter lower bounds (`T < S`).
17
+
18
+ ### Signature updates
19
+
20
+ **Updated classes/modules/methods:** `Addrinfo`, `Array`, `BasicObject`, `BigDecimal`, `Binding`, `CGI`, `Comparable`, `Complex`, `Digest::SHA2`, `Encoding::Converter`, `Enumerable`, `Enumerator`, `Enumerator::ArithmeticSequence`, `Enumerator::Lazy`, `Fiber`, `File`, `FileUtils`, `Float`, `Hash`, `IO`, `IO::TimeoutError`, `Integer`, `JSON`, `Kernel`, `Kconv`, `Math`, `Method`, `Minitest`, `Module`, `Numeric`, `ObjectSpace`, `Open3`, `OpenURI`, `OptionParser`, `PStore`, `Pathname`, `Proc`, `Process::Status`, `Psych`, `Ractor`, `Random`, `Random::Formatter`, `Range`, `Rational`, `RBS::Unnamed::TopLevelSelfClass`, `Ripper::Lexer::Elem`, `Ruby`, `RubyVM`, `SecureRandom`, `Set`, `Socket`, `String`, `StringScanner`, `TCPSocket`, `Thread`, `URI`, `URI::Generic`, `Zlib::GzipReader`, `Zlib::GzipWriter`
21
+
22
+ * Remove deprecated types ([#2880](https://github.com/ruby/rbs/pull/2880))
23
+ * Add type `RBS::Unnamed::TopLevelSelfClass` to core ([#2362](https://github.com/ruby/rbs/pull/2362))
24
+ * Graduate bundled gems from Ruby v4.0 ([#2852](https://github.com/ruby/rbs/pull/2852))
25
+ * stdlib: Add missing Psych methods and exception classes ([#2850](https://github.com/ruby/rbs/pull/2850))
26
+ * Add variants with positional argument to `Hash#transform_keys` ([#2848](https://github.com/ruby/rbs/pull/2848))
27
+ * add extra kwarg options for File#initialize and derivatives ([#2798](https://github.com/ruby/rbs/pull/2798))
28
+ * pstore: fixes types, treat it as a collection ([#2806](https://github.com/ruby/rbs/pull/2806))
29
+ * Add signatures for `{Module,Proc}#ruby2_keywords` ([#2805](https://github.com/ruby/rbs/pull/2805))
30
+ * Make Zlib::GzipWriter.new level and strategy parameters optional ([#2810](https://github.com/ruby/rbs/pull/2810))
31
+ * URI.(s) does string coercion ([#2825](https://github.com/ruby/rbs/pull/2825))
32
+ * Fix String#append_as_bytes to accept Integer ([#2817](https://github.com/ruby/rbs/pull/2817))
33
+ * [Comparable] Add in Comparable::_CompareToZero ([#2697](https://github.com/ruby/rbs/pull/2697))
34
+ * [Kernel] Add Kernel.trace_var and Kernel.untrace_var ([#2682](https://github.com/ruby/rbs/pull/2682))
35
+ * Add signature for `Module#method_undefined` ([#2804](https://github.com/ruby/rbs/pull/2804))
36
+ * Fix Zlib::GzipWriter signatures ([#2803](https://github.com/ruby/rbs/pull/2803))
37
+ * GzipWriter#initialize only takes 1 required positional arg ([#2799](https://github.com/ruby/rbs/pull/2799))
38
+ * Fix accessibility of method in Module ([#2802](https://github.com/ruby/rbs/pull/2802))
39
+ * Graduate kconv ([#2794](https://github.com/ruby/rbs/pull/2794))
40
+ * Fix test related to pathname ([#2789](https://github.com/ruby/rbs/pull/2789))
41
+ * Split pathname to core and stdlib ([#2777](https://github.com/ruby/rbs/pull/2777))
42
+ * [Kernel] Narrow `caller_locations` ([#2745](https://github.com/ruby/rbs/pull/2745))
43
+ * Ruby 4.1 changed `source_location` type ([#2784](https://github.com/ruby/rbs/pull/2784))
44
+ * Remove ObjectSpace.count_nodes ([#2779](https://github.com/ruby/rbs/pull/2779))
45
+ * Support selector for `String#strip` family. ([#2775](https://github.com/ruby/rbs/pull/2775))
46
+ * Add `Ruby`, `Array#find`, and `Array#rfind` ([#2767](https://github.com/ruby/rbs/pull/2767))
47
+ * Update minitest ([#2761](https://github.com/ruby/rbs/pull/2761))
48
+ * Support BigDecimal v4 ([#2758](https://github.com/ruby/rbs/pull/2758))
49
+ * Update rdoc and comments ([#2733](https://github.com/ruby/rbs/pull/2733))
50
+ * Update cgi and cgi/escape type definitions ([#2728](https://github.com/ruby/rbs/pull/2728))
51
+ * Update RBS files for Ruby 4 ([#2731](https://github.com/ruby/rbs/pull/2731))
52
+ * Update existing docs ([#2724](https://github.com/ruby/rbs/pull/2724))
53
+ * Remove reference to `JSON.deep_const_get` ([#2701](https://github.com/ruby/rbs/pull/2701))
54
+ * Remove deprecated methods in `JSON` ([#2366](https://github.com/ruby/rbs/pull/2366))
55
+ * Update FileUtils to v1.8.0 ([#2700](https://github.com/ruby/rbs/pull/2700))
56
+ * Avoid overloading where arguments are identical ([#2559](https://github.com/ruby/rbs/pull/2559))
57
+ * Move Pathname to core from stdlib ([#2705](https://github.com/ruby/rbs/pull/2705))
58
+ * Remove undocumented `#nonzero?` ([#2543](https://github.com/ruby/rbs/pull/2543))
59
+ * Add signature for `OptionParser#raise_unknown` ([#2735](https://github.com/ruby/rbs/pull/2735))
60
+ * Add signature for `Open3.popen2` ([#2734](https://github.com/ruby/rbs/pull/2734))
61
+ * Add RFC2396_PARSER to URI module ([#2727](https://github.com/ruby/rbs/pull/2727))
62
+ * Add signature for `Open3.capture3` ([#2714](https://github.com/ruby/rbs/pull/2714))
63
+ * Remove sig for IO#{ready?,nread} ([#2710](https://github.com/ruby/rbs/pull/2710))
64
+ * Accept `nil` state parameter in `to_json` type signatures ([#2691](https://github.com/ruby/rbs/pull/2691))
65
+ * Add type of `Open3.popen3` ([#2699](https://github.com/ruby/rbs/pull/2699))
66
+ * `unsetenv_others` and `close_others` only allows bool. ([#2698](https://github.com/ruby/rbs/pull/2698))
67
+ * Add deprecated annotation to `attr` with bool args ([#2693](https://github.com/ruby/rbs/pull/2693))
68
+ * Update open3 ([#2692](https://github.com/ruby/rbs/pull/2692))
69
+ * Add signature for `SecureRandom.bytes` ([#2690](https://github.com/ruby/rbs/pull/2690))
70
+ * Set %a{deprecated} to deprecated core methods ([#2664](https://github.com/ruby/rbs/pull/2664))
71
+ * Migrate usages of ::_ToPath to use ::path instead ([#2677](https://github.com/ruby/rbs/pull/2677))
72
+ * Add missing signatures for `Random::Formatter` ([#2680](https://github.com/ruby/rbs/pull/2680))
73
+ * Split `Random::Formatter` to core and stdlib ([#2661](https://github.com/ruby/rbs/pull/2661))
74
+ * Skip test cases of developing methods for Pathname ([#2648](https://github.com/ruby/rbs/pull/2648))
75
+ * Add signature `Random.seed` ([#2649](https://github.com/ruby/rbs/pull/2649))
76
+ * Update `string.rbs` to avoid deprecation warning in Steep ([#2655](https://github.com/ruby/rbs/pull/2655))
77
+ * Add sig `IO#pread` and `IO#pwrite` ([#2647](https://github.com/ruby/rbs/pull/2647))
78
+ * Refine signature of `Numeric#step` and add type of `Enumerator::ArithmeticSequence` ([#2600](https://github.com/ruby/rbs/pull/2600))
79
+ * Remove undocumented override methods ([#2622](https://github.com/ruby/rbs/pull/2622))
80
+ * Add docs ([#2625](https://github.com/ruby/rbs/pull/2625))
81
+ * Remove undocumented methods for `imaginary` ([#2620](https://github.com/ruby/rbs/pull/2620))
82
+ * Update securerandom ([#2619](https://github.com/ruby/rbs/pull/2619))
83
+ * Drop undocumented `#eql?` ([#2618](https://github.com/ruby/rbs/pull/2618))
84
+ * Just use `Numeric#+@` and return self ([#2597](https://github.com/ruby/rbs/pull/2597))
85
+ * Drop undocumented `#dup` ([#2598](https://github.com/ruby/rbs/pull/2598))
86
+ * Add signature for `Digest::SHA2` ([#2573](https://github.com/ruby/rbs/pull/2573))
87
+ * Add signatures for `OpenURI` ([#2574](https://github.com/ruby/rbs/pull/2574))
88
+ * Add signature for `IO::TimeoutError` ([#2571](https://github.com/ruby/rbs/pull/2571))
89
+ * Add signatures for `Set` ([#2570](https://github.com/ruby/rbs/pull/2570))
90
+ * Add signature for `Enumerator#+` ([#2567](https://github.com/ruby/rbs/pull/2567))
91
+ * Add signature for `Enumerator::Lazy#eager` ([#2568](https://github.com/ruby/rbs/pull/2568))
92
+ * Add signature for `Fiber#blocking` ([#2566](https://github.com/ruby/rbs/pull/2566))
93
+ * Support BasicObject to avoid NoMethodError for `RBS::Test::TypeCheck` ([#2565](https://github.com/ruby/rbs/pull/2565))
94
+ * Add documentation for `Range#{minmax,count,to_a,entries}` ([#2562](https://github.com/ruby/rbs/pull/2562))
95
+ * Delegate to `Enumerable` from `Range#{min,max}` ([#2540](https://github.com/ruby/rbs/pull/2540))
96
+ * Add URI::Generic#+ ([#2535](https://github.com/ruby/rbs/pull/2535))
97
+ * Make IO.binread, IO.binwrite, IO.read and IO.write accept _ToPath ([#2378](https://github.com/ruby/rbs/pull/2378))
98
+ * Support pattern argument for Enumerable#{all,any,none,one}? ([#2368](https://github.com/ruby/rbs/pull/2368))
99
+ * fixing sig for addrinfo ([#2464](https://github.com/ruby/rbs/pull/2464))
100
+
101
+ ### Language updates
102
+
103
+ * Add type arguments support to singleton types ([#2502](https://github.com/ruby/rbs/pull/2502))
104
+ * Move the note about lower bound ([#2517](https://github.com/ruby/rbs/pull/2517))
105
+ * Add support for lower bounds in type parameters ([#2490](https://github.com/ruby/rbs/pull/2490))
106
+
107
+ ### Library changes
108
+
109
+ * Add `#type_fingerprint` methods ([#2879](https://github.com/ruby/rbs/pull/2879))
110
+ * `top` for membership predicates of collection types ([#2878](https://github.com/ruby/rbs/pull/2878))
111
+ * Add block parameter (`&block`) type declaration ([#2875](https://github.com/ruby/rbs/pull/2875))
112
+ * Add splat (`*a`) and double-splat (`**a`) parameter support ([#2873](https://github.com/ruby/rbs/pull/2873))
113
+ * Add parameter type inline annotation ([#2443](https://github.com/ruby/rbs/pull/2443))
114
+ * Reduce compile warnings ([#2871](https://github.com/ruby/rbs/pull/2871))
115
+ * Specify input range by byte offsets ([#2863](https://github.com/ruby/rbs/pull/2863))
116
+ * add `extern "C"` wrapping to `rbs.h` when using C++ ([#2855](https://github.com/ruby/rbs/pull/2855))
117
+ * Automatically inherits super method type if unannotated ([#2858](https://github.com/ruby/rbs/pull/2858))
118
+ * Add `...` syntax to method type inline annotation syntax ([#2856](https://github.com/ruby/rbs/pull/2856))
119
+ * Fix for string reference corruption issue ([#2836](https://github.com/ruby/rbs/pull/2836))
120
+ * Use unreleased steep for `rake typecheck_test` ([#2842](https://github.com/ruby/rbs/pull/2842))
121
+ * Fix breaking references after GC.compact ([#2822](https://github.com/ruby/rbs/pull/2822))
122
+ * Fix special methods accessibility. ([#2546](https://github.com/ruby/rbs/pull/2546))
123
+ * Fix allocation alignment ([#2788](https://github.com/ruby/rbs/pull/2788))
124
+ * Skip `set` and `pathname` from `manifest.yaml` ([#2773](https://github.com/ruby/rbs/pull/2773))
125
+ * Fix C++ compiler warnings ([#2755](https://github.com/ruby/rbs/pull/2755))
126
+ * Better encoding ([#2675](https://github.com/ruby/rbs/pull/2675))
127
+ * Move `require_eof` handling to C API ([#2678](https://github.com/ruby/rbs/pull/2678))
128
+ * Delete debug print ([#2753](https://github.com/ruby/rbs/pull/2753))
129
+ * Make assertions macro ([#2729](https://github.com/ruby/rbs/pull/2729))
130
+ * Remove deprecated method `Kernel#Namespace`. Also remove `Kernel#TypeName`. ([#2480](https://github.com/ruby/rbs/pull/2480))
131
+ * Update rdoc to 6.13.1 ([#2355](https://github.com/ruby/rbs/pull/2355))
132
+ * Allow `self` for inline `@rbs @ivar: self` ([#2633](https://github.com/ruby/rbs/pull/2633))
133
+ * Normalize modules during type name resolution ([#2670](https://github.com/ruby/rbs/pull/2670))
134
+ * Only load extconf_compile_commands_json when compiling through Rake ([#2498](https://github.com/ruby/rbs/pull/2498))
135
+ * Use `malloc` based allocator ([#2666](https://github.com/ruby/rbs/pull/2666))
136
+ * Add another parser benchmark script ([#2668](https://github.com/ruby/rbs/pull/2668))
137
+ * Reuse empty array and hash ([#2667](https://github.com/ruby/rbs/pull/2667))
138
+ * Faster lexical analyzer ([#2665](https://github.com/ruby/rbs/pull/2665))
139
+ * Introduce `type_fingerprint` ([#2644](https://github.com/ruby/rbs/pull/2644))
140
+ * Add module-class alias declaration ([#2636](https://github.com/ruby/rbs/pull/2636))
141
+ * Inline constant declaration ([#2635](https://github.com/ruby/rbs/pull/2635))
142
+ * `self` type is rejected depending on the context ([#2627](https://github.com/ruby/rbs/pull/2627))
143
+ * Add instance variable declaration annotation ([#2632](https://github.com/ruby/rbs/pull/2632))
144
+ * Module-self allow void once ([#2626](https://github.com/ruby/rbs/pull/2626))
145
+ * Support inheritance in Inline RBS declaration ([#2630](https://github.com/ruby/rbs/pull/2630))
146
+ * Inline attribute/method definitions have comments ([#2624](https://github.com/ruby/rbs/pull/2624))
147
+ * Inline RBS declaration for attributes (`attr_***`) ([#2623](https://github.com/ruby/rbs/pull/2623))
148
+ * Fix bad scaling in `rbs_comment_t` tokens ([#2578](https://github.com/ruby/rbs/pull/2578))
149
+ * Update parser so that `void` type is rejected depending on the context ([#2590](https://github.com/ruby/rbs/pull/2590))
150
+ * Implement mixin in inline RBS declarations ([#2614](https://github.com/ruby/rbs/pull/2614))
151
+ * Validate type args given to non-generic ancestor ([#2615](https://github.com/ruby/rbs/pull/2615))
152
+ * Add name locations to AST ([#2595](https://github.com/ruby/rbs/pull/2595))
153
+ * Move `exit` calls to `exe/rbs` ([#2591](https://github.com/ruby/rbs/pull/2591))
154
+ * Fix locator ([#2588](https://github.com/ruby/rbs/pull/2588))
155
+ * Introduce standalone C parser for RBS with arena allocation ([#2398](https://github.com/ruby/rbs/pull/2398))
156
+ * Fix subtraction of civar ([#2369](https://github.com/ruby/rbs/pull/2369))
157
+ * Buffer with empty string ([#2551](https://github.com/ruby/rbs/pull/2551))
158
+ * Fix unavailable MAP_ANONYMOUS ([#2470](https://github.com/ruby/rbs/pull/2470))
159
+ * Inline minor fix ([#2514](https://github.com/ruby/rbs/pull/2514))
160
+ * Enable `-Wc++-compat` ([#2463](https://github.com/ruby/rbs/pull/2463))
161
+ * Expose a method to parse type parameters ([#2457](https://github.com/ruby/rbs/pull/2457))
162
+ * Expose and fix `Block#location` ([#2456](https://github.com/ruby/rbs/pull/2456))
163
+ * Restore RBS::Environment#declarations for backwards-compatibility ([#2393](https://github.com/ruby/rbs/pull/2393))
164
+ * Implement `@rbs return: T` annotation ([#2406](https://github.com/ruby/rbs/pull/2406))
165
+ * Add `@rbs skip` annotation ([#2405](https://github.com/ruby/rbs/pull/2405))
166
+ * Inline annotations ([#2403](https://github.com/ruby/rbs/pull/2403))
167
+ * Inline `def` support ([#2392](https://github.com/ruby/rbs/pull/2392))
168
+ * Suppress to GCC warning with multi-line comment ([#2383](https://github.com/ruby/rbs/pull/2383))
169
+ * Add inline class/module declaration ([#2390](https://github.com/ruby/rbs/pull/2390))
170
+ * Add `RBS::Source::RBS` ([#2380](https://github.com/ruby/rbs/pull/2380))
171
+
172
+ #### rbs prototype
173
+
174
+ * [prototype runtime] Find redefined methods ([#2542](https://github.com/ruby/rbs/pull/2542))
175
+
176
+ #### rbs collection
177
+
178
+ ### Miscellaneous
179
+
180
+ * bundle update (2026-01-20) ([#2818](https://github.com/ruby/rbs/pull/2818))
181
+ * Ruby 4.0.1 ([#2823](https://github.com/ruby/rbs/pull/2823))
182
+ * [rbs/test] Check type arguments size ([#2809](https://github.com/ruby/rbs/pull/2809))
183
+ * Add tsort to testing dependencies ([#2795](https://github.com/ruby/rbs/pull/2795))
184
+ * Update ruby to 4.0 ([#2776](https://github.com/ruby/rbs/pull/2776))
185
+ * Ruby 4.0.0 preview3 ([#2764](https://github.com/ruby/rbs/pull/2764))
186
+ * Remove test code for bundled gems ([#2760](https://github.com/ruby/rbs/pull/2760))
187
+ * Fix `nil` size `Enumerator` test ([#2749](https://github.com/ruby/rbs/pull/2749))
188
+ * Fix tests for rbs_skip_tests in ruby repo ([#2725](https://github.com/ruby/rbs/pull/2725))
189
+ * Update rdoc to v6.16 ([#2721](https://github.com/ruby/rbs/pull/2721))
190
+ * Run CI with "4.0.0-preview2" ([#2718](https://github.com/ruby/rbs/pull/2718))
191
+ * Minor typo fix ([#2676](https://github.com/ruby/rbs/pull/2676))
192
+ * Add -j option to make ([#2658](https://github.com/ruby/rbs/pull/2658))
193
+ * Allows the use of a path list as RBS_SKIP_TESTS ([#2612](https://github.com/ruby/rbs/pull/2612))
194
+ * Fix clang-format ([#2589](https://github.com/ruby/rbs/pull/2589))
195
+ * Restrict the execution of the valgrind task to when the C code has been modified. ([#2552](https://github.com/ruby/rbs/pull/2552))
196
+ * Set force_ruby_platform for bundler when head ([#2555](https://github.com/ruby/rbs/pull/2555))
197
+ * More skip paths with valgrind ([#2557](https://github.com/ruby/rbs/pull/2557))
198
+ * Run the `Encoding::Converter` test ([#2550](https://github.com/ruby/rbs/pull/2550))
199
+ * Fix CI ([#2527](https://github.com/ruby/rbs/pull/2527))
200
+ * Replace reference with official documentation ([#2453](https://github.com/ruby/rbs/pull/2453))
201
+ * Add clangd integration for improved C extension development ([#2481](https://github.com/ruby/rbs/pull/2481))
202
+ * Setup clang format for C code ([#2437](https://github.com/ruby/rbs/pull/2437))
203
+ * Add `super` calls in `setup` ([#2484](https://github.com/ruby/rbs/pull/2484))
204
+ * Suppress warnings during testing ([#2370](https://github.com/ruby/rbs/pull/2370))
205
+ * Update rubocop-on-rbs and use plugins ([#2345](https://github.com/ruby/rbs/pull/2345))
206
+ * Fix error at Ruby CI ([#2445](https://github.com/ruby/rbs/pull/2445))
207
+ * Use `erb` instead of `set` for load path testing ([#2439](https://github.com/ruby/rbs/pull/2439))
208
+ * Skip loading ruby_memcheck ([#2349](https://github.com/ruby/rbs/pull/2349))
209
+ * Forcibly uninstall gems even if there is a dependency problem. ([#2346](https://github.com/ruby/rbs/pull/2346))
210
+
211
+ ## 3.10.3 (2026-01-30)
212
+
213
+ This is a minor fix around the dependency to `tsort`.
214
+
215
+ ## Pull Requests
216
+
217
+ * Merge pull request #2601 from ima1zumi/add-tsort-dep ([#2834](https://github.com/ruby/rbs/pull/2834))
218
+
219
+ ## 3.10.2 (2026-01-07)
220
+
221
+ This is a minor fix on arena allocator alignment.
222
+
223
+ ### Pull Requests
224
+
225
+ * Merge pull request #2788 from ruby/fix-alloc-alignment ([#2790](https://github.com/ruby/rbs/pull/2790))
226
+
227
+ ## 3.10.1 (2026-01-07)
228
+
229
+ This is a follow-up release for Ruby 4.0.0 with documentation update based on Ruby 4.0.0, and bugfixes related to set/pathname library loading.
230
+
231
+ ### Pull Requests
232
+
233
+ * Merge pull request #2777 from ksss/pathname-ext ([#2786](https://github.com/ruby/rbs/pull/2786))
234
+ * Ruby 4.0.0 backports ([#2785](https://github.com/ruby/rbs/pull/2785))
235
+ * [Backport] Fix subtraction of civar ([#2783](https://github.com/ruby/rbs/pull/2783))
236
+ * [Backport] Update ruby to 4.0 ([#2778](https://github.com/ruby/rbs/pull/2778))
237
+
238
+ ## 3.10.0 (2025-12-23)
239
+
240
+ RBS 3.10.0 ships with a pure C parser implementation, signature updates for Ruby 4.0, and various bug fixes.
241
+
242
+ ### Pure C parser implementation
243
+
244
+ The new parser implementation was announced at [RubyKaigi 2025](https://rubykaigi.org/2025/presentations/amomchilov.html) and is finally shipped as a RubyGem!
245
+
246
+ The new parser is faster than the one in 3.9 and is portable — it is independent of the Ruby runtime and is used to implement Sorbet’s RBS support.
247
+
248
+ ### Type definition of bundled gems
249
+
250
+ The type definitions of `cgi` have been moved to [gem_rbs_collection](https://github.com/ruby/gem_rbs_collection/tree/main/gems/cgi), as it has been migrated to a bundled gem in Ruby 4.0
251
+
252
+ `cgi-escape` has been added to `stdlib`. You may need to declare a dependency on `cgi-escape` in your `manifest.yaml`, add `-r cgi-escape` to your command line, or update your type checker configuration.
253
+
254
+ ```yaml
255
+ dependencies:
256
+ - name: cgi-escape
257
+ ```
258
+
259
+ The type definitions for `pathname` have also been moved from `stdlib` to `core`, as it is now implemented as part of the core library.
260
+
261
+ ### Pull Requests
262
+
263
+ * [Backport] Support rdoc v7 ([#2770](https://github.com/ruby/rbs/pull/2770))
264
+ * [Backport] Check tuple type length ([#2766](https://github.com/ruby/rbs/pull/2766))
265
+ * Backport update to 4.0.0-preview3 ([#2768](https://github.com/ruby/rbs/pull/2768))
266
+ * [Backport] Remove test code for bundled gems ([#2762](https://github.com/ruby/rbs/pull/2762))
267
+ * Merge pull request #2761 from ruby/update-minitest ([#2763](https://github.com/ruby/rbs/pull/2763))
268
+ * [Backport] Support BigDecimal v4 ([#2759](https://github.com/ruby/rbs/pull/2759))
269
+ * Parser/lexer backports ([#2756](https://github.com/ruby/rbs/pull/2756))
270
+ * Merge pull request #2753 from ruby/delete-printf ([#2754](https://github.com/ruby/rbs/pull/2754))
271
+ * Backports ([#2751](https://github.com/ruby/rbs/pull/2751))
272
+ * Merge pull request #2728 from ruby/cgi ([#2747](https://github.com/ruby/rbs/pull/2747))
273
+ * Merge pull request #2729 from ruby/rbs-assert ([#2748](https://github.com/ruby/rbs/pull/2748))
274
+ * Merge pull request #2749 from ruby/fix-test ([#2750](https://github.com/ruby/rbs/pull/2750))
275
+ * Backport RBS file updates ([#2742](https://github.com/ruby/rbs/pull/2742))
276
+ * Backport JSON PRs ([#2740](https://github.com/ruby/rbs/pull/2740))
277
+ * Merge pull request #2718 from ruby/ruby-4 ([#2741](https://github.com/ruby/rbs/pull/2741))
278
+ * [Backport] Move Pathname to core from stdlib ([#2730](https://github.com/ruby/rbs/pull/2730))
279
+ * Backport rdoc 6.16 ([#2722](https://github.com/ruby/rbs/pull/2722))
280
+ * Backport rdoc support ([#2719](https://github.com/ruby/rbs/pull/2719))
281
+ * Backport "Remove sig for IO#{ready?,nread}" ([#2720](https://github.com/ruby/rbs/pull/2720))
282
+ * Backport more pure C parsers ([#2679](https://github.com/ruby/rbs/pull/2679))
283
+ * Backport module name normalization ([#2673](https://github.com/ruby/rbs/pull/2673))
284
+ * Backport pure-C parser ([#2671](https://github.com/ruby/rbs/pull/2671))
285
+ * Fix test failure ([#2672](https://github.com/ruby/rbs/pull/2672))
286
+
287
+ ## 3.9.5 (2025-09-08)
288
+
289
+ ### Signature updates
290
+
291
+ * Merge pull request #2655 from ruby/silence-string-deprecation ([#2656](https://github.com/ruby/rbs/pull/2656))
292
+
293
+ ### Miscellaneous
294
+
295
+ * Allows the use of a path list as RBS_SKIP_TESTS ([#2641](https://github.com/ruby/rbs/pull/2641))
296
+ * Suppress to GCC warning with multi-line comment ([#2646](https://github.com/ruby/rbs/pull/2646))
297
+ * Backport to 3.9 ([#2487](https://github.com/ruby/rbs/pull/2487))
298
+ * Use erb instead of set for load path testing ([#2468](https://github.com/ruby/rbs/pull/2468))
299
+
300
+ ## 3.9.4 (2025-05-15)
301
+
302
+ ### Miscellaneous
303
+
304
+ * Backport test/CI fixes to 3.9 ([#2487](https://github.com/ruby/rbs/pull/2487))
305
+ * Use erb instead of set for load path testing ([#2468](https://github.com/ruby/rbs/pull/2468))
306
+
307
+ ## 3.9.3 (2025-05-09)
308
+
309
+ ### Miscellaneous
310
+
311
+ * Use erb instead of set for load path testing ([#2468](https://github.com/ruby/rbs/pull/2468))
312
+
313
+ ## 3.9.2 (2025-03-31)
314
+
315
+ ### Library changes
316
+
317
+ * Change `{}` to `{ 0 }` ([#2354](https://github.com/ruby/rbs/pull/2354))
318
+
319
+ ## 3.9.1 (2025-03-24)
320
+
321
+ ### Miscellaneous
322
+
323
+ * `did_you_mean` is a default gem ([#2348](https://github.com/ruby/rbs/pull/2348))
324
+ * Skip loading ruby_memcheck ([#2347](https://github.com/ruby/rbs/pull/2347))
325
+
3
326
  ## 3.9.0 (2025-03-18)
4
327
 
5
328
  ### Miscellaneous
data/README.md CHANGED
@@ -141,7 +141,7 @@ require "rbs"
141
141
  loader = RBS::EnvironmentLoader.new()
142
142
 
143
143
  # loader.add(path: Pathname("sig")) # Load .rbs files from `sig` directory
144
- # loader.add(library: "pathname") # Load pathname library
144
+ # loader.add(library: "logger") # Load logger library
145
145
 
146
146
  environment = RBS::Environment.from_loader(loader).resolve_type_names
147
147
 
data/Rakefile CHANGED
@@ -25,22 +25,16 @@ test_config = lambda do |t|
25
25
  t.test_files = FileList["test/**/*_test.rb"].reject do |path|
26
26
  path =~ %r{test/stdlib/}
27
27
  end
28
- end
29
-
30
- Rake::TestTask.new(test: :compile, &test_config)
31
-
32
- unless Gem.win_platform?
33
- begin
34
- require "ruby_memcheck"
35
-
36
- namespace :test do
37
- RubyMemcheck::TestTask.new(valgrind: :compile, &test_config)
28
+ if defined?(RubyMemcheck)
29
+ if t.is_a?(RubyMemcheck::TestTask)
30
+ t.verbose = true
31
+ t.options = '-v'
38
32
  end
39
- rescue LoadError => exn
40
- STDERR.puts "🚨🚨🚨🚨 Skipping RubyMemcheck: #{exn.inspect} 🚨🚨🚨🚨"
41
33
  end
42
34
  end
43
35
 
36
+ Rake::TestTask.new(test: :compile, &test_config)
37
+
44
38
  multitask :default => [:test, :stdlib_test, :typecheck_test, :rubocop, :validate, :test_doc]
45
39
 
46
40
  task :lexer do
@@ -185,7 +179,7 @@ end
185
179
  task :validate => :compile do
186
180
  require 'yaml'
187
181
 
188
- sh "#{ruby} #{rbs} validate --exit-error-on-syntax-error"
182
+ sh "#{ruby} #{rbs} validate"
189
183
 
190
184
  libs = FileList["stdlib/*"].map {|path| File.basename(path).to_s }
191
185
 
@@ -206,7 +200,14 @@ task :validate => :compile do
206
200
  end
207
201
 
208
202
  libs.each do |lib|
209
- sh "#{ruby} #{rbs} -r #{lib} validate --exit-error-on-syntax-error"
203
+ args = ["-r", lib]
204
+
205
+ if lib == "rbs"
206
+ args << "-r"
207
+ args << "prism"
208
+ end
209
+
210
+ sh "#{ruby} #{rbs} #{args.join(' ')} validate"
210
211
  end
211
212
  end
212
213
 
@@ -218,7 +219,7 @@ end
218
219
 
219
220
  task :stdlib_test => :compile do
220
221
  test_files = FileList["test/stdlib/**/*_test.rb"].reject do |path|
221
- path =~ %r{Ractor} || path =~ %r{Encoding} || path =~ %r{CGI_test}
222
+ path =~ %r{Ractor} || path =~ %r{Encoding} || path =~ %r{CGI-escape_test}
222
223
  end
223
224
 
224
225
  if ENV["RANDOMIZE_STDLIB_TEST_ORDER"] == "true"
@@ -227,27 +228,22 @@ task :stdlib_test => :compile do
227
228
 
228
229
  sh "#{ruby} -Ilib #{bin}/test_runner.rb #{test_files.join(' ')}"
229
230
  # TODO: Ractor tests need to be run in a separate process
230
- sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/CGI_test.rb"
231
+ sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/CGI-escape_test.rb"
231
232
  sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Ractor_test.rb"
232
233
  sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Encoding_test.rb"
233
234
  end
234
235
 
235
236
  task :typecheck_test => :compile do
236
- puts
237
- puts
238
- puts "⛔️⛔️⛔️⛔️⛔️⛔️ Skipping type check test because RBS is incompatible with Steep (#{__FILE__}:#{__LINE__})"
239
- puts
240
- puts
241
- # FileList["test/typecheck/*"].each do |test|
242
- # Dir.chdir(test) do
243
- # expectations = File.join(test, "steep_expectations.yml")
244
- # if File.exist?(expectations)
245
- # sh "steep check --with_expectations"
246
- # else
247
- # sh "steep check"
248
- # end
249
- # end
250
- # end
237
+ FileList["test/typecheck/*"].each do |test|
238
+ Dir.chdir(test) do
239
+ expectations = File.join(test, "steep_expectations.yml")
240
+ if File.exist?(expectations)
241
+ sh "steep check --with_expectations"
242
+ else
243
+ sh "steep check"
244
+ end
245
+ end
246
+ end
251
247
  end
252
248
 
253
249
  task :raap => :compile do
@@ -325,7 +321,7 @@ namespace :generate do
325
321
  class <%= target %>SingletonTest < Test::Unit::TestCase
326
322
  include TestHelper
327
323
 
328
- # library "pathname", "securerandom" # Declare library signatures to load
324
+ # library "logger", "securerandom" # Declare library signatures to load
329
325
  testing "singleton(::<%= target %>)"
330
326
 
331
327
  <%- class_methods.each do |method_name, definition| -%>
@@ -344,7 +340,7 @@ namespace :generate do
344
340
  class <%= target %>Test < Test::Unit::TestCase
345
341
  include TestHelper
346
342
 
347
- # library "pathname", "securerandom" # Declare library signatures to load
343
+ # library "logger", "securerandom" # Declare library signatures to load
348
344
  testing "::<%= target %>"
349
345
 
350
346
  <%- instance_methods.each do |method_name, definition| -%>
@@ -535,3 +531,17 @@ task :compile_c99 do
535
531
  ensure
536
532
  ENV.delete("TEST_NO_C23")
537
533
  end
534
+
535
+ task :prepare_bench do
536
+ ENV.delete("DEBUG")
537
+ Rake::Task[:"clobber"].invoke
538
+ Rake::Task[:"templates"].invoke
539
+ Rake::Task[:"compile"].invoke
540
+ end
541
+
542
+ task :prepare_profiling do
543
+ ENV["DEBUG"] = "1"
544
+ Rake::Task[:"clobber"].invoke
545
+ Rake::Task[:"templates"].invoke
546
+ Rake::Task[:"compile"].invoke
547
+ end
data/Steepfile CHANGED
@@ -15,6 +15,7 @@ target :lib do
15
15
  signature "stdlib/rdoc/0/"
16
16
  signature "stdlib/ripper/0"
17
17
  signature "stdlib/pp/0"
18
+ signature "steep/patch.rbs"
18
19
 
19
20
  # configure_code_diagnostics do |config|
20
21
  # config[D::Ruby::MethodDefinitionMissing] = :hint