зеркало из https://github.com/github/ruby.git
* eval.c (compile_error): must not clear ruby_sourcefile here.
(ruby-bugs:PR#364). * eval.c (rb_longjmp): set ruby_sourcefile before making backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
92ca6c7773
Коммит
e3f7536501
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Fri Aug 16 07:57:26 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
Fri Aug 16 07:56:16 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* eval.c (compile_error): must not clear ruby_sourcefile here.
|
||||
(ruby-bugs:PR#364).
|
||||
|
||||
* eval.c (rb_longjmp): set ruby_sourcefile before making
|
||||
backtrace.
|
||||
|
||||
Thu Aug 15 20:38:58 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* eval.c (ruby_current_node) : added to set sourceline on demand.
|
||||
|
|
4
eval.c
4
eval.c
|
@ -1282,7 +1282,6 @@ compile_error(at)
|
|||
{
|
||||
VALUE str;
|
||||
|
||||
ruby_sourcefile = 0;
|
||||
ruby_nerrs = 0;
|
||||
str = rb_str_buf_new2("compile error");
|
||||
if (at) {
|
||||
|
@ -3602,6 +3601,7 @@ rb_longjmp(tag, mesg)
|
|||
mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
|
||||
}
|
||||
|
||||
ruby_set_current_source();
|
||||
if (ruby_sourcefile && !NIL_P(mesg)) {
|
||||
at = get_backtrace(mesg);
|
||||
if (NIL_P(at)) {
|
||||
|
@ -3618,7 +3618,6 @@ rb_longjmp(tag, mesg)
|
|||
VALUE e = ruby_errinfo;
|
||||
|
||||
StringValue(e);
|
||||
ruby_set_current_source();
|
||||
fprintf(stderr, "Exception `%s' at %s:%d - %s\n",
|
||||
rb_class2name(CLASS_OF(ruby_errinfo)),
|
||||
ruby_sourcefile, ruby_sourceline,
|
||||
|
@ -5036,7 +5035,6 @@ eval(self, src, scope, file, line)
|
|||
}
|
||||
if (file == 0) {
|
||||
ruby_set_current_source();
|
||||
ruby_current_node = 0;
|
||||
file = ruby_sourcefile;
|
||||
line = ruby_sourceline;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче