class RuboCop::Cop::Style::SpaceInsideBlockBraces

def on_block(node)

def on_block(node)
  return if node.loc.begin.is?('do') # No braces.
  # If braces are on separate lines, and the BlockDelimiters cop is
  # enabled, those braces will be changed to do..end by the user or by
  # auto-correct, so reporting space issues is not useful, and it
  # creates auto-correct conflicts.
  if config.for_cop('Style/BlockDelimiters')['Enabled'] &&
     block_length(node) > 0
    return
  end
  left_brace = node.loc.begin
  right_brace = node.loc.end
  check_inside(node, left_brace, right_brace)
end