From: William Sobel Date: 2009-01-14T10:45:37+09:00 Subject: [ruby-core:21326] [Bug #848] debug.rb doesn't have access to the source file under test until it has run Issue #848 has been updated by William Sobel. Found a patch that fixes this bug, not sure if it's correct. The problem is the compile_for_eval is always 1 (coming from the th->parse_in_eval flag.) The parse_in_eval is incremented in the process_options function, not sure why. I tried to change the value and things broke in a most horrible manor. Found a quick fix that seems to work correctly, just removed the check for compile_in_eval. The check for debug_lines seems to do the right thing. Not sure if this is a help, just trying to be useful. ;-) Hope this helps, - Will Sobel Index: parse.y =================================================================== --- parse.y (revision 21497) +++ parse.y (working copy) @@ -4977,7 +4977,7 @@ NODE *tree; struct parser_params *parser = (struct parser_params *)arg; - if (!compile_for_eval && rb_safe_level() == 0) { + if (rb_safe_level() == 0) { ruby_debug_lines = debug_lines(ruby_sourcefile); if (ruby_debug_lines && ruby_sourceline > 0) { VALUE str = STR_NEW0(); ---------------------------------------- http://redmine.ruby-lang.org/issues/show/848 ---------------------------------------- http://redmine.ruby-lang.org