mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (call_trace_func): restore source file/line, as trace
function installed in required library with -r option can be called while parsing. (ruby-bugs:PR#372) * eval.c (module_setup): unused variable. [ruby-core:00358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c4a482229
commit
941e43aacf
2 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
Sat Aug 24 15:32:16 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* eval.c (call_trace_func): restore source file/line, as trace
|
||||
function installed in required library with -r option can be
|
||||
called while parsing. (ruby-bugs:PR#372)
|
||||
|
||||
* eval.c (module_setup): unused variable. [ruby-core:00358]
|
||||
|
||||
Sat Aug 24 13:57:28 2002 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/time.rb (Time.rfc2822, Time#rfc2822): preserve localtimeness.
|
||||
|
|
11
eval.c
11
eval.c
|
@ -2079,12 +2079,16 @@ call_trace_func(event, node, self, id, klass)
|
|||
{
|
||||
int state;
|
||||
struct FRAME *prev;
|
||||
NODE *node_save = ruby_last_node;
|
||||
NODE *node_save[2];
|
||||
VALUE srcfile;
|
||||
|
||||
if (!trace_func) return;
|
||||
if (tracing) return;
|
||||
|
||||
node_save[0] = ruby_last_node;
|
||||
if (!(node_save[1] = ruby_current_node)) {
|
||||
node_save[1] = NEW_NEWLINE(0);
|
||||
}
|
||||
tracing = 1;
|
||||
prev = ruby_frame;
|
||||
PUSH_FRAME();
|
||||
|
@ -2120,7 +2124,9 @@ call_trace_func(event, node, self, id, klass)
|
|||
POP_FRAME();
|
||||
|
||||
tracing = 0;
|
||||
ruby_last_node = node_save;
|
||||
ruby_last_node = node_save[0];
|
||||
ruby_current_node = node_save[1];
|
||||
SET_CURRENT_SOURCE();
|
||||
if (state) JUMP_TAG(state);
|
||||
}
|
||||
|
||||
|
@ -3424,7 +3430,6 @@ module_setup(module, n)
|
|||
int state;
|
||||
struct FRAME frame;
|
||||
VALUE result; /* OK */
|
||||
NODE * cnode = ruby_current_node; /* NOT IN USE, is it OK? */
|
||||
TMP_PROTECT;
|
||||
|
||||
frame = *ruby_frame;
|
||||
|
|
Loading…
Add table
Reference in a new issue