ruby-changes:4432
From: ko1@a...
Date: Tue, 8 Apr 2008 10:41:06 +0900 (JST)
Subject: [ruby-changes:4432] matz - Ruby:r15923 (trunk): * load.c (rb_require_safe): should check fname path after $SAFE is
matz 2008-04-08 10:40:49 +0900 (Tue, 08 Apr 2008) New Revision: 15923 Modified files: trunk/ChangeLog trunk/load.c Log: * load.c (rb_require_safe): should check fname path after $SAFE is properly set. [ruby-dev:34268] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/load.c?r1=15923&r2=15922&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15923&r2=15922&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 15922) +++ ChangeLog (revision 15923) @@ -1,3 +1,8 @@ +Tue Apr 8 10:34:10 2008 Yukihiro Matsumoto <matz@r...> + + * load.c (rb_require_safe): should check fname path after $SAFE is + properly set. [ruby-dev:34268] + Tue Apr 8 10:30:29 2008 Nobuyoshi Nakada <nobu@r...> * common.mk (prelude.c): depends on enc/prelude.rb. Index: load.c =================================================================== --- load.c (revision 15922) +++ load.c (revision 15923) @@ -520,8 +520,6 @@ } volatile saved; char *volatile ftptr = 0; - FilePathValue(fname); - RB_GC_GUARD(fname) = rb_str_new4(fname); PUSH_TAG(); saved.safe = rb_safe_level(); if ((state = EXEC_TAG()) == 0) { @@ -530,6 +528,8 @@ int found; rb_set_safe_level_force(safe); + FilePathValue(fname); + RB_GC_GUARD(fname) = rb_str_new4(fname); found = search_required(fname, &path); if (found) { if (!path || !(ftptr = load_lock(RSTRING_PTR(path)))) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/