зеркало из https://github.com/github/ruby.git
* parse.y (lex_getline): should update ruby_debug_lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
3054488377
Коммит
fbdc2bf5f7
|
@ -1,3 +1,7 @@
|
||||||
|
Wed Oct 20 10:31:33 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (lex_getline): should update ruby_debug_lines.
|
||||||
|
|
||||||
Wed Oct 20 04:17:55 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Oct 20 04:17:55 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* ext/dbm/dbm.c (fdbm_delete_if): should check if deleting element
|
* ext/dbm/dbm.c (fdbm_delete_if): should check if deleting element
|
||||||
|
|
3
eval.c
3
eval.c
|
@ -2457,6 +2457,7 @@ call_trace_func(event, node, self, id, klass)
|
||||||
if (!trace_func) return;
|
if (!trace_func) return;
|
||||||
if (tracing) return;
|
if (tracing) return;
|
||||||
if (id == ID_ALLOCATOR) return;
|
if (id == ID_ALLOCATOR) return;
|
||||||
|
if (!node && ruby_sourceline == 0) return;
|
||||||
|
|
||||||
if (!(node_save = ruby_current_node)) {
|
if (!(node_save = ruby_current_node)) {
|
||||||
node_save = NEW_BEGIN(0);
|
node_save = NEW_BEGIN(0);
|
||||||
|
@ -2491,7 +2492,7 @@ call_trace_func(event, node, self, id, klass)
|
||||||
INT2FIX(ruby_sourceline),
|
INT2FIX(ruby_sourceline),
|
||||||
id?ID2SYM(id):Qnil,
|
id?ID2SYM(id):Qnil,
|
||||||
self?rb_f_binding(self):Qnil,
|
self?rb_f_binding(self):Qnil,
|
||||||
klass),
|
klass?klass:Qnil),
|
||||||
Qundef, 0);
|
Qundef, 0);
|
||||||
}
|
}
|
||||||
if (raised) thread_set_raised();
|
if (raised) thread_set_raised();
|
||||||
|
|
|
@ -97,6 +97,7 @@ class Tracer
|
||||||
SCRIPT_LINES__[file] = list = []
|
SCRIPT_LINES__[file] = list = []
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if l = list[line - 1]
|
if l = list[line - 1]
|
||||||
l
|
l
|
||||||
else
|
else
|
||||||
|
|
9
parse.y
9
parse.y
|
@ -4351,6 +4351,7 @@ yycompile(parser, f, line)
|
||||||
|
|
||||||
ruby_current_node = 0;
|
ruby_current_node = 0;
|
||||||
ruby_sourcefile = rb_source_filename(f);
|
ruby_sourcefile = rb_source_filename(f);
|
||||||
|
ruby_sourceline = line - 1;
|
||||||
n = yyparse((void*)parser);
|
n = yyparse((void*)parser);
|
||||||
ruby_debug_lines = 0;
|
ruby_debug_lines = 0;
|
||||||
compile_for_eval = 0;
|
compile_for_eval = 0;
|
||||||
|
@ -4402,7 +4403,11 @@ static VALUE
|
||||||
lex_getline(parser)
|
lex_getline(parser)
|
||||||
struct parser_params *parser;
|
struct parser_params *parser;
|
||||||
{
|
{
|
||||||
return (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
|
VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
|
||||||
|
if (ruby_debug_lines && !NIL_P(line)) {
|
||||||
|
rb_ary_push(ruby_debug_lines, line);
|
||||||
|
}
|
||||||
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
|
@ -4419,7 +4424,6 @@ rb_compile_string(f, s, line)
|
||||||
lex_gets_ptr = 0;
|
lex_gets_ptr = 0;
|
||||||
lex_input = s;
|
lex_input = s;
|
||||||
lex_pbeg = lex_p = lex_pend = 0;
|
lex_pbeg = lex_p = lex_pend = 0;
|
||||||
ruby_sourceline = line - 1;
|
|
||||||
compile_for_eval = ruby_in_eval;
|
compile_for_eval = ruby_in_eval;
|
||||||
|
|
||||||
return yycompile(parser, f, line);
|
return yycompile(parser, f, line);
|
||||||
|
@ -4454,7 +4458,6 @@ rb_compile_file(f, file, start)
|
||||||
lex_gets = lex_io_gets;
|
lex_gets = lex_io_gets;
|
||||||
lex_input = file;
|
lex_input = file;
|
||||||
lex_pbeg = lex_p = lex_pend = 0;
|
lex_pbeg = lex_p = lex_pend = 0;
|
||||||
ruby_sourceline = start - 1;
|
|
||||||
|
|
||||||
return yycompile(parser, f, start);
|
return yycompile(parser, f, start);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче