зеркало из https://github.com/github/ruby.git
* load.c (rb_require_safe): FilePathValue() implies rb_str_new4().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
087ecdf5ed
Коммит
7d8ae4129e
|
@ -1,4 +1,6 @@
|
|||
Sat Jun 13 14:57:36 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat Jun 13 14:58:57 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* load.c (rb_require_safe): FilePathValue() implies rb_str_new4().
|
||||
|
||||
* load.c (rb_mod_autoload): try conversion to path like as
|
||||
require. [ruby-core:23834]
|
||||
|
|
3
load.c
3
load.c
|
@ -545,7 +545,7 @@ load_ext(VALUE path)
|
|||
VALUE
|
||||
rb_require_safe(VALUE fname, int safe)
|
||||
{
|
||||
VALUE result = Qnil;
|
||||
volatile VALUE result = Qnil;
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
volatile VALUE errinfo = th->errinfo;
|
||||
int state;
|
||||
|
@ -563,7 +563,6 @@ rb_require_safe(VALUE fname, int safe)
|
|||
|
||||
rb_set_safe_level_force(safe);
|
||||
FilePathValue(fname);
|
||||
RB_GC_GUARD(fname) = rb_str_new4(fname);
|
||||
rb_set_safe_level_force(0);
|
||||
found = search_required(fname, &path);
|
||||
if (found) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче