RubyMine 2021.3 EAP Is Open!
Hello everyone! Welcome to RubyMine’s third Early Access Program of 2021!
As always, we encourage you to use these EAP builds to try out the new features before the official release. We are looking forward to hearing your feedback!
Here are the main highlights of the first EAP build:
- Bundled RBS
- New inspections for type checking
- Parameter info based on RBS
- Copyright for RBS files
- Other improvements for RBS support
- Support for Class#method syntax in search
RubyMine 2021.3 will come bundled with RBS signatures. With the RBS signatures present, RubyMine is able to provide improved code assistance, such as real-time type checking, more precise search and refactoring, and more.
Previously, RubyMine relied on its own stubs for the Ruby standard library, and used them in its type inference. Here are some of the benefits of replacing them with signatures from RBS:
- RBS works for all versions of Ruby. For versions of Ruby lower than 3, RubyMine removes any signatures for methods that do not exist in that version’s standard library.
- There’s no need to manually add the
rbsgem to the project.
- The new signatures are based on RBS, and by definition comply with Ruby standard libraries.
- The new signatures for standard Ruby libraries are more readable.
- The types are more accurate, because with RBS you can describe more complex cases, such as interfaces or generics.
rbs gem is absent in a project, RubyMine will show an
rbs [bundled] external library entry. If the
rbs gem is present in the Gemfile, this entry will not be displayed.
New inspections for type checking
We’ve added a number of new inspections for detecting mismatches between assigned values and expected types taken from RBS.
These inspections check the types of constants, instance and class variables, method and block parameters, return values, arguments passed to yield calls, and global variables.
You can find these inspections under Preferences / Settings | Editor | Inspections | Ruby.
Parameter info based on RBS
The Parameter info pop-up (⌘P / Ctrl+P) displays the names and types of method parameters. It can now use type information from the corresponding RBS signatures (if they are present).
Copyright for RBS files
It is now possible to automatically add copyright information to the beginning of RBS files.
Other improvements for RBS support
In this release, we are adding the finishing touches to RBS support and fixing some corner cases. Here are some of the improvements:
- New gutter icons are available for navigating between overloaded methods in RBS files.
- RubyMine now supports singleton instance variables and singleton attributes, and it is able to provide type checking and hints for such cases.
Support for Class#method syntax in search
You can now use the
Class#method format to find methods via Search | Symbols.
Early Access Program Key Facts
- The EAP version of RubyMine is free to use. It will expire in 30 days.
- You will have to log in to your JetBrains account to use this build.
- This is pre-release software, and it may not work as intended.
- You can install the EAP version alongside a stable version of RubyMine.
- EAP versions of RubyMine report statistics by default. These statistics help us improve user experience. You can opt-out by changing the settings in Preferences/Settings | Appearance & Behavior | System Settings | Data Sharing.
- EAP versions have their own documentation as well.
Join the Early Access Program
To learn about the newest features as they come out, please follow RubyMine on Twitter. We post product news and tips several times a week.
We encourage you to share your thoughts in the comments below and to create and vote for features in the issue tracker.
The RubyMine team