Skip to content

Releases: ruby/rbs

4.0.2

25 Mar 06:47
ec51456

Choose a tag to compare

Release note

Library changes

rbs collection

  • Fix: pathname not written to lockfile. (#2889)

Miscellaneous

  • Fix test failure on Windows in ruby/ruby (#2900)
  • Fix test for Ruby 4.1 (#2899)

3.10.4

25 Mar 05:22
8e689c7

Choose a tag to compare

Release note

Library changes

rbs collection

  • [Backport] [3.10] Fix: pathname not written to lockfile. (#2896)

4.0.0

17 Mar 05:32
c46454b

Choose a tag to compare

Release note

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 for the syntax details.

class Calculator
  # @rbs (Integer, Integer) -> Integer
  def add(a, b) = a + b
end

Note: RBS inline is still experimental and may change in future releases.

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).

Signature updates

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

  • Remove deprecated types (#2880)
  • Add type RBS::Unnamed::TopLevelSelfClass to core (#2362)
  • Graduate bundled gems from Ruby v4.0 (#2852)
  • stdlib: Add missing Psych methods and exception classes (#2850)
  • Add variants with positional argument to Hash#transform_keys (#2848)
  • add extra kwarg options for File#initialize and derivatives (#2798)
  • pstore: fixes types, treat it as a collection (#2806)
  • Add signatures for {Module,Proc}#ruby2_keywords (#2805)
  • Make Zlib::GzipWriter.new level and strategy parameters optional (#2810)
  • URI.(s) does string coercion (#2825)
  • Fix String#append_as_bytes to accept Integer (#2817)
  • [Comparable] Add in Comparable::_CompareToZero (#2697)
  • [Kernel] Add Kernel.trace_var and Kernel.untrace_var (#2682)
  • Add signature for Module#method_undefined (#2804)
  • Fix Zlib::GzipWriter signatures (#2803)
  • GzipWriter#initialize only takes 1 required positional arg (#2799)
  • Fix accessibility of method in Module (#2802)
  • Graduate kconv (#2794)
  • Fix test related to pathname (#2789)
  • Split pathname to core and stdlib (#2777)
  • [Kernel] Narrow caller_locations (#2745)
  • Ruby 4.1 changed source_location type (#2784)
  • Remove ObjectSpace.count_nodes (#2779)
  • Support selector for String#strip family. (#2775)
  • Add Ruby, Array#find, and Array#rfind (#2767)
  • Update minitest (#2761)
  • Support BigDecimal v4 (#2758)
  • Update rdoc and comments (#2733)
  • Update cgi and cgi/escape type definitions (#2728)
  • Update RBS files for Ruby 4 (#2731)
  • Update existing docs (#2724)
  • Remove reference to JSON.deep_const_get (#2701)
  • Remove deprecated methods in JSON (#2366)
  • Update FileUtils to v1.8.0 (#2700)
  • Avoid overloading where arguments are identical (#2559)
  • Move Pathname to core from stdlib (#2705)
  • Remove undocumented #nonzero? (#2543)
  • Add signature for OptionParser#raise_unknown (#2735)
  • Add signature for Open3.popen2 (#2734)
  • Add RFC2396_PARSER to URI module (#2727)
  • Add signature for Open3.capture3 (#2714)
  • Remove sig for IO#{ready?,nread} (#2710)
  • Accept nil state parameter in to_json type signatures (#2691)
  • Add type of Open3.popen3 (#2699)
  • unsetenv_others and close_others only allows bool. (#2698)
  • Add deprecated annotation to attr with bool args (#2693)
  • Update open3 (#2692)
  • Add signature for SecureRandom.bytes (#2690)
  • Set %a{deprecated} to deprecated core methods (#2664)
  • Migrate usages of ::_ToPath to use ::path instead (#2677)
  • Add missing signatures for Random::Formatter (#2680)
  • Split Random::Formatter to core and stdlib (#2661)
  • Skip test cases of developing methods for Pathname (#2648)
  • Add signature Random.seed (#2649)
  • Update string.rbs to avoid deprecation warning in Steep (#2655)
  • Add sig IO#pread and IO#pwrite (#2647)
  • Refine signature of Numeric#step and add type of Enumerator::ArithmeticSequence (#2600)
  • Remove undocumented override methods (#2622)
  • Add docs (#2625)
  • Remove undocumented methods for imaginary (#2620)
  • Update securerandom (#2619)
  • Drop undocumented #eql? (#2618)
  • Just use Numeric#+@ and return self (#2597)
  • Drop undocumented #dup (#2598)
  • Add signature for Digest::SHA2 (#2573)
  • Add signatures for OpenURI (#2574)
  • Add signature for IO::TimeoutError (#2571)
  • Add signatures for Set (#2570)
  • Add signature for Enumerator#+ (#2567)
  • Add signature for Enumerator::Lazy#eager (#2568)
  • Add signature for Fiber#blocking (#2566)
  • Support BasicObject to avoid NoMethodError for RBS::Test::TypeCheck (#2565)
  • Add documentation for Range#{minmax,count,to_a,entries} (#2562)
  • Delegate to Enumerable from Range#{min,max} (#2540)
  • Add URI::Generic#+ (#2535)
  • Make IO.binread, IO.binwrite, IO.read and IO.write accept _ToPath (#2378)
  • Support pattern argument for Enumerable#{all,any,none,one}? (#2368)
  • fixing sig for addrinfo (#2464)

Language updates

  • Add type arguments support to singleton types (#2502)
  • Move the note about lower bound (#2517)
  • Add support for lower bounds in type parameters (#2490)

Library changes

  • Add #type_fingerprint methods (#2879)
  • top for membership predicates of collection types (#2878)
  • Add block parameter (&block) type declaration (#2875)
  • Add splat (*a) and double-splat (**a) parameter support (#2873)
  • Add parameter type inline annotation (#2443)
  • Reduce compile warnings (#2871)
  • Specify input range by byte offsets (#2863)
  • add extern "C" wrapping to rbs.h when using C++ (#2855)
  • Automatically inherits super method type if unannotated (#2858)
  • Add ... syntax to method type inline annotation syntax (#2856)
  • Fix for string reference corruption issue ([#2836](https://github....
Read more

3.10.3

30 Jan 14:08
ac64601

Choose a tag to compare

Release note

This is a minor fix around the dependency to tsort.

Pull Requests

  • Merge pull request #2601 from ima1zumi/add-tsort-dep (#2834)

4.0.0.dev.5

07 Jan 20:40
e798267

Choose a tag to compare

4.0.0.dev.5 Pre-release
Pre-release

Release note

Miscellaneous

3.10.2

07 Jan 20:38
2aa7356

Choose a tag to compare

Release note

This is a minor fix on arena allocator alignment.

Pull Requests

  • Merge pull request #2788 from ruby/fix-alloc-alignment (#2790)

3.10.1

07 Jan 07:03
5f4e4bc

Choose a tag to compare

Release note

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.

Pull Requests

  • Merge pull request #2777 from ksss/pathname-ext (#2786)
  • Ruby 4.0.0 backports (#2785)
  • [Backport] Fix subtraction of civar (#2783)
  • [Backport] Update ruby to 4.0 (#2778)

3.10.0

23 Dec 07:45
d95a129

Choose a tag to compare

Release note

RBS 3.10.0 ships with a pure C parser implementation, signature updates for Ruby 4.0, and various bug fixes.

Pure C parser implementation

The new parser implementation was announced at RubyKaigi 2025 and is finally shipped as a RubyGem!

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.

Type definition of bundled gems

The type definitions of cgi have been moved to gem_rbs_collection, as it has been migrated to a bundled gem in Ruby 4.0

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.

dependencies:
  - name: cgi-escape

The type definitions for pathname have also been moved from stdlib to core, as it is now implemented as part of the core library.

Pull Requests

  • [Backport] Support rdoc v7 (#2770)
  • [Backport] Check tuple type length (#2766)
  • Backport update to 4.0.0-preview3 (#2768)
  • [Backport] Remove test code for bundled gems (#2762)
  • Merge pull request #2761 from ruby/update-minitest (#2763)
  • [Backport] Support BigDecimal v4 (#2759)
  • Parser/lexer backports (#2756)
  • Merge pull request #2753 from ruby/delete-printf (#2754)
  • Backports (#2751)
  • Merge pull request #2728 from ruby/cgi (#2747)
  • Merge pull request #2729 from ruby/rbs-assert (#2748)
  • Merge pull request #2749 from ruby/fix-test (#2750)
  • Backport RBS file updates (#2742)
  • Backport JSON PRs (#2740)
  • Merge pull request #2718 from ruby/ruby-4 (#2741)
  • [Backport] Move Pathname to core from stdlib (#2730)
  • Backport rdoc 6.16 (#2722)
  • Backport rdoc support (#2719)
  • Backport "Remove sig for IO#{ready?,nread}" (#2720)
  • Backport more pure C parsers (#2679)
  • Backport module name normalization (#2673)
  • Backport pure-C parser (#2671)
  • Fix test failure (#2672)

3.10.0.pre.2

23 Dec 07:29
408baff

Choose a tag to compare

3.10.0.pre.2 Pre-release
Pre-release

3.10.0.pre.1

23 Dec 07:29
a22fbf1

Choose a tag to compare

3.10.0.pre.1 Pre-release
Pre-release