Skip to content

Commit d73d078

Browse files
committed
Version 4.1.0
1 parent 8aeb996 commit d73d078

3 files changed

Lines changed: 90 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,93 @@
11
# CHANGELOG
22

3+
## 4.1.0 (2026-07-27)
4+
5+
RBS 4.1 ships with JRuby support. The RBS parser is written in plain C without depending on the Ruby C API, so it is compiled to WebAssembly and runs on a Wasm runtime, with the parsed AST serialized in a binary format and decoded into RBS objects. The full test suite runs on JRuby in CI.
6+
7+
The inline RBS syntax gets three new features: singleton method definitions (`def self.`), the `module-self` constraint, and instance variable annotations in `module` declarations. Note that RBS inline is still experimental and may change in future releases.
8+
9+
This release also introduces `RBS::Rewriter`, an API to edit RBS source text while preserving the surrounding content, which `rbs annotate` is now built on. Parsing performance is improved by interning type names in a shared trie and reducing allocations per node.
10+
11+
`RBS::Prototype::Runtime`, the RDoc plugin parser, and the top-level `float` type alias are deprecated in this release.
12+
13+
### Signature updates
14+
15+
**Updated classes/modules/methods:** `ARGF`, `Array`, `CSV`, `Class`, `Delegator`, `Digest`, `ERB`, `Enumerable`, `Enumerator`, `Enumerator::Product`, `Etc`, `File`, `File::Constants`, `File::Stat`, `FileUtils`, `Float`, `Gem`, `Hash`, `IO`, `IPAddr`, `Integer`, `JSON`, `Kernel`, `MatchData`, `Module`, `Monitor`, `Numeric`, `ObjectSpace::WeakKeyMap`, `OpenSSL`, `Pathname`, `RBS::Ops`, `Ractor`, `Range`, `Resolv`, `RubyVM::InstructionSequence`, `Set`, `Shellwords`, `String`, `StringIO`, `StringScanner`, `Struct`, `Tempfile`, `Thread`, `Timeout`, `TSort`, `URI::Generic`, `Zlib::GzipReader`, `Zlib::ZStream`
16+
17+
* Remove stale Float constants and add a constant drift test ([#2994](https://github.com/ruby/rbs/pull/2994))
18+
* Update RDoc comments with Ruby 4.0.6 ([#3035](https://github.com/ruby/rbs/pull/3035))
19+
* Add a dependency on tempfile. ([#3025](https://github.com/ruby/rbs/pull/3025))
20+
* Support `%a{implicitly-returns-nil}` on `MatchData#[]` ([#2990](https://github.com/ruby/rbs/pull/2990))
21+
* Update `Array` ([#2987](https://github.com/ruby/rbs/pull/2987))
22+
* Allow nil output buffers for reader methods ([#3002](https://github.com/ruby/rbs/pull/3002))
23+
* Add stdlib signature tests for #2967 ([#2989](https://github.com/ruby/rbs/pull/2989))
24+
* Update `Integer`, phase 1 ([#2995](https://github.com/ruby/rbs/pull/2995))
25+
* Add RBS::Ops ([#2934](https://github.com/ruby/rbs/pull/2934))
26+
* Update Module ([#2933](https://github.com/ruby/rbs/pull/2933))
27+
* Correct core/stdlib signatures to match Ruby 4.0 ([#2967](https://github.com/ruby/rbs/pull/2967))
28+
* Revert Digest::Class method changes ([#2980](https://github.com/ruby/rbs/pull/2980))
29+
* Add stdlib tests for updated StringScanner signatures ([#2968](https://github.com/ruby/rbs/pull/2968))
30+
* Update `StringScanner` signatures to match strscan 3.1.6 ([#2959](https://github.com/ruby/rbs/pull/2959))
31+
* Remove StringScanner methods absent from the latest Ruby release ([#2961](https://github.com/ruby/rbs/pull/2961))
32+
* Fix `Resolv#initialize` signature: array of resolvers + `use_ipv6:` ([#2960](https://github.com/ruby/rbs/pull/2960))
33+
* [Hash] Update Hash's signatures and tests to be correct ([#2694](https://github.com/ruby/rbs/pull/2694))
34+
* update rbs signatures to be more consistent with generics ([#2867](https://github.com/ruby/rbs/pull/2867))
35+
* Use top-level `path` in fileutils.rbs to suppress deprecation warning ([#2949](https://github.com/ruby/rbs/pull/2949))
36+
* Update File::Constants and File::Stat ([#2942](https://github.com/ruby/rbs/pull/2942))
37+
* Add signature for `RubyVM::InstructionSequence.of` ([#2916](https://github.com/ruby/rbs/pull/2916))
38+
* fix OpenSSL#session_new_cb signature ([#2924](https://github.com/ruby/rbs/pull/2924))
39+
* [Class] update class.rbs ([#2898](https://github.com/ruby/rbs/pull/2898))
40+
* Deprecate top-level float ([#2695](https://github.com/ruby/rbs/pull/2695))
41+
* [Kernel] Updated querying methods ([#2685](https://github.com/ruby/rbs/pull/2685))
42+
43+
### Library changes
44+
45+
* Convert character offset to byte offset in parse_inline_*_annotation ([#2945](https://github.com/ruby/rbs/pull/2945))
46+
* Guard against underflow when sysconf(_SC_PAGESIZE) returns 0 ([#3031](https://github.com/ruby/rbs/pull/3031))
47+
* Report invalid UTF-8 byte in a comment as a parsing error ([#2983](https://github.com/ruby/rbs/pull/2983))
48+
* Fetch Chicory/ASM jars from Maven instead of bundling in gem ([#3019](https://github.com/ruby/rbs/pull/3019))
49+
* Add write barrier protection to RBS Location objects ([#3022](https://github.com/ruby/rbs/pull/3022))
50+
* Rename parameter in rbs_intern_type_name for clarity ([#3023](https://github.com/ruby/rbs/pull/3023))
51+
* Deprecate RDoc plugin parser ([#3016](https://github.com/ruby/rbs/pull/3016))
52+
* Run the test suite on JRuby (JRuby support, step 4) ([#3008](https://github.com/ruby/rbs/pull/3008))
53+
* Run the RBS parser on JRuby via WebAssembly (JRuby support, step 3) ([#3000](https://github.com/ruby/rbs/pull/3000))
54+
* Add binary serialization of the parsed AST (JRuby support, step 2) ([#2999](https://github.com/ruby/rbs/pull/2999))
55+
* Build the RBS parser as a WebAssembly module (JRuby support, step 1) ([#2998](https://github.com/ruby/rbs/pull/2998))
56+
* Reject reversed position ranges in parser/lexer entrypoints ([#2974](https://github.com/ruby/rbs/pull/2974))
57+
* Fix lexer infinite loop / abort on invalid UTF-8 byte ([#2973](https://github.com/ruby/rbs/pull/2973))
58+
* Flyweight TypeName / Namespace cached in a shared trie ([#2957](https://github.com/ruby/rbs/pull/2957))
59+
* Reduce Hash allocation per `Node` creation ([#2946](https://github.com/ruby/rbs/pull/2946))
60+
* Tidy `ast_translation.c` ([#2947](https://github.com/ruby/rbs/pull/2947))
61+
* Auto-generate rbs_ast_ruby_annotations_t union from config.yml ([#2939](https://github.com/ruby/rbs/pull/2939))
62+
* Speed up RBS::InlineParser on large sources with non-ASCII characters ([#2950](https://github.com/ruby/rbs/pull/2950))
63+
* Support `def self.method_name` singleton method in inline parser ([#2935](https://github.com/ruby/rbs/pull/2935))
64+
* This is not prism ([#2951](https://github.com/ruby/rbs/pull/2951))
65+
* Add RBS::Rewriter and use it in rbs annotate ([#2927](https://github.com/ruby/rbs/pull/2927))
66+
* Add nullability annotations to AST pointer types ([#2922](https://github.com/ruby/rbs/pull/2922))
67+
* Support `module-self` inline annotation ([#2921](https://github.com/ruby/rbs/pull/2921))
68+
* Inline instance variable annotation in module declaration ([#2919](https://github.com/ruby/rbs/pull/2919))
69+
70+
#### rbs prototype
71+
72+
* Fix nested declarations in rbs prototype rbi ([#3029](https://github.com/ruby/rbs/pull/3029))
73+
* Deprecate prototype runtime ([#2956](https://github.com/ruby/rbs/pull/2956))
74+
75+
#### rbs collection
76+
77+
* Clean up partial clone before falling back to full clone ([#2978](https://github.com/ruby/rbs/pull/2978))
78+
* Suppress spurious warning for non-gem stdlib libraries ([#2929](https://github.com/ruby/rbs/pull/2929))
79+
80+
### Miscellaneous
81+
82+
* Fix Lint/DuplicateMethods in StringIO_test.rb ([#3010](https://github.com/ruby/rbs/pull/3010))
83+
* Compressed files must be opened in binary mode ([#2981](https://github.com/ruby/rbs/pull/2981))
84+
* Fix flaky DirSingletonTest GC failures in test_fchdir and test_for_fd ([#3004](https://github.com/ruby/rbs/pull/3004))
85+
* Add TruffleRuby CI job ([#2996](https://github.com/ruby/rbs/pull/2996))
86+
* Update the target Ruby version notes to the latest release ([#2962](https://github.com/ruby/rbs/pull/2962))
87+
* Update docs/inline.md to match current inline parser behavior ([#2953](https://github.com/ruby/rbs/pull/2953))
88+
* ci: skip Gemfile.lock BUNDLED WITH on ruby-head ([#2952](https://github.com/ruby/rbs/pull/2952))
89+
* Remove `logger` from sig dependencies ([#2904](https://github.com/ruby/rbs/pull/2904))
90+
391
## 4.0.2 (2026-03-25)
492

593
### Library changes

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GIT
2222
PATH
2323
remote: .
2424
specs:
25-
rbs (4.1.0.pre.2)
25+
rbs (4.1.0)
2626
logger
2727
prism (>= 1.6.0)
2828
tsort

lib/rbs/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module RBS
4-
VERSION = "4.1.0.pre.2"
4+
VERSION = "4.1.0"
55
end

0 commit comments

Comments
 (0)