alphagov/styleguides — pull request #33 by JordanHatch (2014-05-28 10:00:33+00:00)
Title: [Discuss] Use of braces vs do...end in Ruby blocks

This is something we don't really have any guidance on in the styleguide. I've always liked [the convention described here](https://web.archive.org/web/20140221124509/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc) for when to use braces or `do...end` in Ruby blocks.

_TL;DR: Use `{ ... }` when the block returns something, and use `do ... end` when the block is executed for its side effects._

Is this a good convention that we should adopt? (Does it really matter much at all?)