зеркало из https://github.com/github/ruby.git
* load.c (load_lock): show backtrace at circular require.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b26e4cbb22
Коммит
3bfa955a8c
|
@ -1,4 +1,6 @@
|
|||
Sat Jun 13 15:00:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat Jun 13 15:03:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* load.c (load_lock): show backtrace at circular require.
|
||||
|
||||
* load.c (rb_provide): assumes us-ascii only.
|
||||
|
||||
|
|
3
load.c
3
load.c
|
@ -379,7 +379,10 @@ load_lock(const char *ftptr)
|
|||
st_insert(loading_tbl, (st_data_t)ftptr, data);
|
||||
return (char *)ftptr;
|
||||
}
|
||||
if (RTEST(ruby_verbose)) {
|
||||
rb_warning("loading in progress, circular require considered harmful - %s", ftptr);
|
||||
rb_backtrace();
|
||||
}
|
||||
return RTEST(rb_barrier_wait((VALUE)data)) ? (char *)ftptr : 0;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче