bbatsov/rubocop — pull request #228 by emou (2013-06-01 18:40:38+00:00)
Title: Add new cop BlockNesting

It checks whether you've nested too many if/while/etc. blocks
which increase the cyclomatic complexity.

@bbatsov this could be changed to only checked inside `def`s as you proposed, but I haven't done it, since I don't see a problem with doing the check at all levels?
Maybe you meant to do that if we were to count `do`/`end` blocks, too. Let me know if you prefer to do that.

I think it's a question of definition, i.e. whether this rule is meant to prevent syntactical nesting, or nesting that increases cyclomatic complexity.