Skip to content

Release Note 3.9

Soutaro Matsumoto edited this page Mar 18, 2025 · 7 revisions

Some of the highlights in RBS 3.9 are:

  • Add resolve-type-names: false magic comment (#2234)
  • Annotations on constants, globals, class/module aliases (#2302)
  • Improved method annotation processing (#2301)
  • Improved validation (#2237, #2241, #2289, #2294, #2300)
  • Untyped proc type can have self type hint (#2325)

You can install it with $ gem install rbs --pre or using Bundler.

gem 'rbs', '~> 3.9.0.dev'

Read the CHANGELOG for the details.

Add resolve-type-names: false magic comment

PR: #2234

You can add resolve-type-names: false magic comment at the beginning of RBS files to skip type name resolution. This makes RBS file loading faster, typically for generated RBS files where the type names can be identified already.

# resolve-type-names: false

class Foo
  def foo: () -> ::String         # ::String should be used instead of String
end

Annotations on constants, globals, class/module aliases

PR: #2302

Constant declarations, global declarations, and class/module alias declarations can be annotated.

%a{deprecated}
VERSION: String

%a{deprecated}
$NAME: String

%a{deprecated}
module Foo = Kernel

Improved method annotation processing

PR: #2301

Improved validation

PRs: #2237, #2241, #2289, #2294, #2300

Clone this wiki locally