Please sign in to comment.
Add spec for require after $LOAD_PATH change
When developer add something to $LOAD_PATH and require once again the same file ruby should not require it once again. Example: Rubinius have lib/racc/parser.rb file. And this file will require after bootstrap. require 'racc/parser' After require 'rubygems' $LOAD_PATH will change and now we have access to two version on 'racc/parser' (from Rubinius /lib and /gems/racc). When user try to require once again rubinius will search via $LOAD_PATH and hit racc/parser from _RUBYGEMS_. In ruby 1.9 mode all paths are expanded so rubinius will require once again 'racc/parser'. This is because in $LOADED_FEATURES we can find only "[rubinius_path]/lib/racc/parser.rb". When CodeLoader will find file in $LOAD_PATH ([rubygems]/racc/parser.rb) and full path is not part of $LOADED_FEATURES this file will be load once again.
- Loading branch information...
Showing with 8 additions and 0 deletions.
|@@ -0,0 +1 @@|
|+ScratchPad << :loaded|