ruby-changes:15029
From: shugo <ko1@a...>
Date: Sat, 13 Mar 2010 11:16:50 +0900 (JST)
Subject: [ruby-changes:15029] Ruby:r26904 (trunk): * load.c (rb_get_expanded_load_path): expand paths if any item in $:
shugo 2010-03-13 11:16:20 +0900 (Sat, 13 Mar 2010) New Revision: 26904 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26904 Log: * load.c (rb_get_expanded_load_path): expand paths if any item in $: is not a string. Modified files: trunk/ChangeLog trunk/load.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26903) +++ ChangeLog (revision 26904) @@ -1,3 +1,8 @@ +Sat Mar 13 11:14:26 2010 Shugo Maeda <shugo@r...> + + * 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@r...> * load.c (rb_get_expanded_load_path): does not expand paths if all Index: load.c =================================================================== --- load.c (revision 26903) +++ load.c (revision 26904) @@ -41,10 +41,8 @@ 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/