{"id":250500,"date":"2022-05-27T14:49:01","date_gmt":"2022-05-27T13:49:01","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=ruby&#038;p=250500"},"modified":"2022-08-09T17:16:34","modified_gmt":"2022-08-09T16:16:34","slug":"rubymine-2022-2-eap2","status":"publish","type":"ruby","link":"https:\/\/blog.jetbrains.com\/zh-hans\/ruby\/2022\/05\/rubymine-2022-2-eap2","title":{"rendered":"RubyMine 2022.2 EAP2"},"content":{"rendered":"<p>The second 2022.2 EAP build is now available! Here are the build highlights:<\/p>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ruby\/2022\/05\/rubymine-2022-2-eap2#rbs_generic_fallback\">Improved support for retrieving types from unknown classes in RBS<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ruby\/2022\/05\/rubymine-2022-2-eap2#exit_comment_line\">New option to exit line comment continuation<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ruby\/2022\/05\/rubymine-2022-2-eap2#gemfile_from_rubocop\">Open Gemfile from a RuboCop suggestion<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ruby\/2022\/05\/rubymine-2022-2-eap2#yard_rendering\">Improved rendering of YARD docs<\/a><\/li>\n<\/ul>\n<h2 id=\"rbs_generic_fallback\">Improved support for retrieving types from unknown classes in RBS<\/h2>\n<p>Previously, we only provided types for an object if its class had an RBS signature. If there was no corresponding RBS signature, we could only retrieve the types of methods from <code>Object<\/code>.<\/p>\n<p>We&#8217;ve improved type inference for unknown classes, so RubyMine will now look up the types for methods from all known ancestors from Ruby, not just <code>Object<\/code>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-250526 size-full\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/05\/rm_222_rbs_generic_fallback.png\" alt=\"\" width=\"1362\" height=\"564\"><\/p>\n<p>This feature is especially useful when using classes and modules from the standard library in the ancestry of your own classes.<\/p>\n<h2 id=\"exit_comment_line\">New option to exit line comment continuation<\/h2>\n<p>This version adds the new option to delete an empty comment line by pressing <em>Enter<\/em>. To enable the option, toggle the <strong>Delete empty line comment with Enter<\/strong> checkbox in <strong>Preferences \/ Settings | Advanced Settings | Ruby<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-250573 size-full\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/05\/rm_222_exit_comment_line_continuation-1.gif\" alt=\"\" width=\"1780\" height=\"860\"><\/p>\n<p>Use <em><span style=\"color: #19191c;\">\u21e7\u23ce <\/span><\/em><span style=\"color: #19191c;\">on macOS or <\/span><span style=\"color: #19191c;\"><em>Shift+Enter<\/em><\/span><span style=\"color: #19191c;\"> on Windows to insert an empty comment line.<\/span><\/p>\n<h2 id=\"gemfile_from_rubocop\">Open Gemfile from a RuboCop suggestion<\/h2>\n<p>Now you can open your Gemfile and add the RuboCop gem right from the <a href=\"https:\/\/www.jetbrains.com\/help\/ruby\/2022.2\/notifications.html\" target=\"_blank\" rel=\"noopener\">Notifications tool window<\/a>. When you see the <strong>Set up RuboCop <\/strong>suggestion in the <em>Notifications<\/em> tool window, click <strong>Add<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-250537 size-full\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/05\/rm_222_rubocop_gemfile.png\" alt=\"\" width=\"1912\" height=\"1028\"><\/p>\n<h2 id=\"yard_rendering\">Improved rendering of YARD docs<\/h2>\n<p>Check out the updated look and feel of <a href=\"https:\/\/www.jetbrains.com\/help\/ruby\/2022.2\/documenting-source-code.html#toggle-rendered-view\" target=\"_blank\" rel=\"noopener\">YARD comments and tags<\/a> when rendering them in the editor. We tidied up indentation and styles to make code documentation inside the IDE more uniform.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-250548 size-full\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/05\/rm_222_yard_rendering.png\" alt=\"\" width=\"1610\" height=\"772\"><\/p>\n<p>In this EAP, we\u2019ve also fixed a bunch of inspection problems (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-28714\/Ruby-inspections-Redundant-safe-navigation-is-triggered-wrongly\" data-wplink-edit=\"true\" target=\"_blank\" rel=\"noopener\">RUBY-28714<\/a>, <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-29700\/Redundant-safe-navigation-inspection-wrongly-triggered-by-Array-\" target=\"_blank\" rel=\"noopener\">RUBY-29700<\/a>, <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-29507\/Incorrectly-flagging-safe-navigation-on-array-index-as-redundant\" target=\"_blank\" rel=\"noopener\">RUBY-29507<\/a>, <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-29698\/Possibly-incorrect-RBS-for-Array-collect-map-body-is-marked-as-i\" target=\"_blank\" rel=\"noopener\">RUBY-29698<\/a>) and the issue with the browser preview links from views (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RUBY-15328\/Browser-url-from-views-is-incorrect-for-the-namespaced-controlle\" target=\"_blank\" rel=\"noopener\">RUBY-15328<\/a>).<\/p>\n<h2>Join the Early Access Program<\/h2>\n<p>You can download the latest EAP build <a href=\"https:\/\/www.jetbrains.com\/ruby\/nextversion\/\" target=\"_blank\" rel=\"noopener\">from our website<\/a> or via the <a href=\"https:\/\/www.jetbrains.com\/toolbox-app\/\" target=\"_blank\" rel=\"noopener\">Toolbox app<\/a>. The full list of closed tickets in this EAP build is in the <a href=\"https:\/\/youtrack.jetbrains.com\/articles\/RUBY-A-220364950\/RubyMine-2022-2-EAP-2-222-2680-4-build-Release-Notes\" target=\"_blank\" rel=\"noopener\">release notes<\/a>.<\/p>\n<p>To learn about the newest features as they come out, please follow <a href=\"https:\/\/twitter.com\/rubymine\" target=\"_blank\" rel=\"noopener\">RubyMine on Twitter<\/a>. We post product news and tips several times a week.<\/p>\n<p>We encourage you to share your thoughts in the comments below and to create and vote for new features in the <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/ruby\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a>.<\/p>\n<p><em>Happy developing!<\/em><\/p>\n<p>The RubyMine team<\/p>\n\n\n<p><\/p>\n","protected":false},"author":1310,"featured_media":247816,"comment_status":"closed","ping_status":"closed","template":"","categories":[826],"tags":[6986,600],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/250500"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/ruby"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1310"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=250500"}],"version-history":[{"count":11,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/250500\/revisions"}],"predecessor-version":[{"id":253216,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/250500\/revisions\/253216"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/247816"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=250500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=250500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=250500"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=250500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}