<pre><code>something.each do |x|

  #lots of stuff

end if some_condition
</code></pre>

I'd personally advocate against that for the pure and simple reason that it is too easy to miss. Even with that shortened version it took me a double-take to realise you had the
```
```
if some_condition
```
```
at the end