From: "nobu (Nobuyoshi Nakada)" Date: 2013-12-12T22:09:04+09:00 Subject: [ruby-core:59071] [ruby-trunk - Bug #9244] unexpected behaviour of 'require' when $LOAD_PATH gets changed Issue #9244 has been updated by nobu (Nobuyoshi Nakada). Description updated ---------------------------------------- Bug #9244: unexpected behaviour of 'require' when $LOAD_PATH gets changed https://bugs.ruby-lang.org/issues/9244#change-43624 Author: sylvain.joyeux (Sylvain Joyeux) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: 1.9.3p484, 2.0.0p353 Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN =begin For the purpose of reproducing the error, let's assume that I have two folders ((%a/%)) and ((%b/%)) which both contain a file ((%test.rb%)) In the following script, ((%b/test.rb%)) will NOT get loaded: $LOAD_PATH.unshift File.join(Dir.pwd, 'a') require 'test.rb' $LOAD_PATH.unshift File.join(Dir.pwd, 'b') require 'test.rb' =end I would have expected this behaviour before, when required files were not registered through their absolute paths in $LOADED_FEATURES. Right now, I find it confusing. -- http://bugs.ruby-lang.org/