ruby-changes:12013
From: nobu <ko1@a...>
Date: Sat, 13 Jun 2009 14:59:15 +0900 (JST)
Subject: [ruby-changes:12013] Ruby:r23679 (trunk): * load.c (rb_require_safe): FilePathValue() implies rb_str_new4().
nobu 2009-06-13 14:59:01 +0900 (Sat, 13 Jun 2009) New Revision: 23679 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23679 Log: * load.c (rb_require_safe): FilePathValue() implies rb_str_new4(). Modified files: trunk/ChangeLog trunk/load.c Index: ChangeLog =================================================================== --- ChangeLog (revision 23678) +++ ChangeLog (revision 23679) @@ -1,5 +1,7 @@ -Sat Jun 13 14:57:36 2009 Nobuyoshi Nakada <nobu@r...> +Sat Jun 13 14:58:57 2009 Nobuyoshi Nakada <nobu@r...> + * 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] Index: load.c =================================================================== --- load.c (revision 23678) +++ load.c (revision 23679) @@ -545,7 +545,7 @@ 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_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) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/