From: "ko1 (Koichi Sasada)" Date: 2012-10-27T05:30:55+09:00 Subject: [ruby-core:48335] [ruby-trunk - Feature #2710] Kernel#load loads a relative path Issue #2710 has been updated by ko1 (Koichi Sasada). Description updated Target version changed from 2.0.0 to next minor I changed target to next minor because no discussion on it. ---------------------------------------- Feature #2710: Kernel#load loads a relative path https://bugs.ruby-lang.org/issues/2710#change-31643 Author: brixen (Brian Ford) Status: Assigned Priority: Normal Assignee: akr (Akira Tanaka) Category: core Target version: next minor =begin It was my understanding that Kernel#require was changed to not load a relative path because of a security issue (http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/24155). Does this security issue not apply to Kernel#load, too? Have I misunderstood the expected behavior? $ cat a.rb puts 1 $ cat b.rb load 'a.rb' require 'a.rb' $ ruby1.8.7 -v b.rb ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin9.8.0] 1 1 $ ruby1.9 -v b.rb ruby 1.9.2dev (2010-02-03 trunk 26546) [i386-darwin9.8.0] 1 b.rb:2:in `require': no such file to load -- a.rb (LoadError) from b.rb:2:in `
' $ RUBYLIB=. ruby1.9 -v b.rb ruby 1.9.2dev (2010-02-03 trunk 26546) [i386-darwin9.8.0] 1 1 Thanks, Brian =end -- http://bugs.ruby-lang.org/