Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:10:40+00:00 2026-05-26T11:10:40+00:00

RubyMine can toggle block syntax between do;end and { } block notation. For example,

  • 0

RubyMine can toggle block syntax between do;end and { } block notation. For example, given the following code:

[1, 2, 3].each do |i|
  puts i
end

I can place the caret at do and press Option-Enter Enter (on the Mac) to convert this code snippet to:

[1, 2, 3].each { |i| puts i }

Doing the same with the caret at the { performs the reverse transformation.

However when the code inside the block contains Ruby 1.9.2’s new hash syntax, RubyMine destroys it during the transformation:

# before
[1, 2, 3].each { |i| some_func(param: i) }

# after
[1, 2, 3].each do |i|
  some_func(param : i)
end

Note the space between param and the :.

I looked through the Ruby style options in RubyMine’s preferences but wasn’t able to find anything which controls colons. How can I prevent RubyMine from messing around with my colons?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:10:41+00:00Added an answer on May 26, 2026 at 11:10 am

    It appears to be a bug, I’ve submitted it to the RubyMine issue tracker, feel free to watch/vote.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can run my tests by just running parts of my code via RubyMine
I have the following Haml code: %ul#sub-nav %li.li1 %a{:href => /dsadasd/} dasdasd %li.li2 %a.selected{:href
In RubyMine the PATH when running rake tasks, for example, never contains /usr/local/bin, which
Each time I start my Rails 2.3.8 webapp under RubyMine, it's using a different
I have installed RubyMine on OS X and Windows 7, and neither can connect
Is it possible to format or reindent html in RubyMine 3.2.4? I tried Code...
How to disable creating an '.idea' folder in Rubymine? It creates that folder after
Im getting the errors below despite following the documentation. In test_helper.rb ENV[RAILS_ENV] = test
Is it possible to change the default encoding for RubyMine to be UTF-8 instead
The code below: context should destroy participation do setup do @p = Factory.create :participation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.