* 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:
nobu 2002-08-24 06:32:40 +00:00
Родитель 9c4a482229
Коммит 941e43aacf
2 изменённых файлов: 16 добавлений и 3 удалений

Просмотреть файл

@ -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
Просмотреть файл

@ -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;