From: Brian Candler Date: 2009-11-20T01:34:15+09:00 Subject: Re: How to strip ruby comments in a ruby line of code? 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/.