I'm not a Ruby programmer, but a couple of these things just look completely wrong:<p># good<p>def some_method(some_arr)<p><pre><code> some_arr.size
</code></pre>
end<p>Omitting the return statement is a good thing? How do you know if this method even returns anything? .size could be a method that doesn't return anything, right, since parens are optional?<p>#good<p>do_something if something_else<p>This, to me, is horrible.<p>If you're just scanning down the file, you can easily miss the if statement, and assume the do_something always goes off.<p>Also, it's incredibly hard to process when I'm mentally executing the code in my head. Generally if there's a method call on the left, you just do it... but now we hit this if statement, ok, so mentally undo the method call we just processed, now check the if statement... now skip back to the do_something and reapply the method call... and now skip the if statement and continue on in the code.<p>...or you could just do
if something_else then do_something
(if you really must have single line if statements, which I am also against, but not so much as the if statement after the method it's controlling access to)