Ruby will trace the source of exceptions back to either the block of the 
method, so there's no problem there.
As for as debugging, that's down to you to modify the code by adding "p" 
or "puts thing.inspect" in order to narrow down the source of an issue.

The main reason for using blocks is flexibility, and a great example is 
"File.open". If you open a file without using a block, you must remember 
to close it or you risk locking access to the file.
If you use a block, then the method can handle the before and after 
(opening and closing the file), while giving the caller full control 
over what happens to the file in between.

-- 
Posted via http://www.ruby-forum.com/.