Skip to content
neilconway edited this page Feb 23, 2011 · 1 revision

Code Blocks

  • For multiline blocks, do ... end should be used
  • For single-line blocks, {...} should be used. In particular, this whitespace should be used:
[1, 2, 3].each {|i| puts i}
Clone this wiki locally