Oh I see - eval doesn't work with a ruby debugger. I guess the debugger
is assuming that the line number in the exception backtrace is an offset
from the start of the eval string, which it isn't here.
I did think of another and simpler solution for you though. When you
insert a newline and close-brace, add a semicolon and not another
newline. e.g.
n: foo(bar) # comment
nextline
becomes:
label(:n) { foo(bar) # comment
}; nextline
How would that be?
--
Posted via http://www.ruby-forum.com/.