Automatic block conversion on enter

Hi,

Recently Rubymine has started to automatically convert ruby blocks using curly braces (like `foo.collect { |a| … }`) to use `do … end` when you press enter after the block parameters. Is there any way to disable this behavior?

Thanks!

0
3 comments

Hello Chap,

I tried pasting the following code in RubyMine 2023.2.2:
A = [1,
     2,
     3]

A.each { | x | puts x }

But the curly braces were not replaced with a do block. Are your steps the same?

0

In addition, please check that ‘Convert {} blocks to do..end by Enter’ is disabled in Preferences/Settings | Editor | Code Style | Ruby | Code Generation

1

In addition, please check that ‘Convert {} blocks to do..end by Enter’ is disabled in Preferences/Settings | Editor | Code Style | Ruby | Code Generation

Thank you! That was it. I'd looked all over and missed that setting.

0

Please sign in to leave a comment.