diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-31 10:23:39 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-31 10:23:39 +0000 |
commit | f08e82d145e8ade1deb25af55b8e43bb86d1e938 (patch) | |
tree | 23acb76ba30953d59e97dfecd02645e198336427 /doc/NEWS | |
parent | d60f7a931ee3426397706e04a024b58d2525a5ad (diff) |
Update the require/$LOADPATH paragraph.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/NEWS')
-rw-r--r-- | doc/NEWS | 36 |
1 files changed, 24 insertions, 12 deletions
@@ -60,18 +60,30 @@ Summary of the changes since 1.6.4: Added. -: require - - Changed to search directories for ".rb" and ".so" at the same time, - instead of search directories for ".rb" then for ".so". The - previous behavior had a security risk. [ruby-bugs (PR#140)] - - Which means, now: - - require "socket" - - will find the standard socket.so prior to a socket.rb in the current - directory. +: require / $LOAD_PATH + + Changed to use a new algorithm to locate a library. + + Now when requiring "foo", the following directories are searched for + the library in the order listed. + + $prefix/lib/ruby/site_ruby/$ver/foo.rb + $prefix/lib/ruby/site_ruby/$ver/foo.so + $prefix/lib/ruby/site_ruby/$ver/$arch/foo.rb + $prefix/lib/ruby/site_ruby/$ver/$arch/foo.so + $prefix/lib/ruby/site_ruby/foo.rb + $prefix/lib/ruby/site_ruby/foo.so + $prefix/lib/ruby/$ver/foo.rb + $prefix/lib/ruby/$ver/foo.so + $prefix/lib/ruby/$ver/$arch/foo.rb + $prefix/lib/ruby/$ver/$arch/foo.so + ./foo.rb + ./foo.so + + The previous behavior had a potential security risk because a + foo.rb (if exists) in the current directory is located prior to a + foo.so in $prefix/lib/ruby/site_ruby/$ver/$arch. + [ruby-bugs (PR#140)] : lib/sync.rb : lib/mutex_m.rb |