The Ruby style guide explicitly allows both of the following styles. The official Rubocop configuration accepts only the latter.
# good
[1, 2, 3].each {|num| puts num }
[1, 2, 3].each { |num| puts num }
There seems no way exists to allow both styles without entirely disabling Layout/SpaceInsideBlockBraces (unwanted styles such as [1, 2, 3].each{|foo| bar} will also be allowed).
Is that an option?
The Ruby style guide explicitly allows both of the following styles. The official Rubocop configuration accepts only the latter.
There seems no way exists to allow both styles without entirely disabling Layout/SpaceInsideBlockBraces (unwanted styles such as
[1, 2, 3].each{|foo| bar}will also be allowed).Is that an option?