1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* load.c (rb_get_expanded_load_path): expand paths if any item in $:

is not a string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2010-03-13 02:16:20 +00:00
parent d9fe7ef492
commit 06fa07662b
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Sat Mar 13 11:14:26 2010 Shugo Maeda <shugo@ruby-lang.org>
* load.c (rb_get_expanded_load_path): expand paths if any item in $:
is not a string.
Sat Mar 13 10:16:32 2010 Shugo Maeda <shugo@ruby-lang.org>
* load.c (rb_get_expanded_load_path): does not expand paths if all

6
load.c
View file

@ -41,10 +41,8 @@ rb_get_expanded_load_path(void)
long i;
for (i = 0; i < RARRAY_LEN(load_path); ++i) {
VALUE str = RARRAY_PTR(load_path)[i];
if (TYPE(str) != T_STRING)
RB_GC_GUARD(str) = rb_get_path(str);
if (!rb_is_absolute_path(RSTRING_PTR(str)))
VALUE str = rb_check_string_type(RARRAY_PTR(load_path)[i]);
if (NIL_P(str) || !rb_is_absolute_path(RSTRING_PTR(str)))
goto relative_path_found;
}
return load_path;