Add spec for require after $LOAD_PATH change #1881

Merged
merged 3 commits into from Apr 26, 2013
Commits on Mar 29, 2013
  1. @LTe

    Add spec for require after $LOAD_PATH change

    LTe committed Aug 31, 2012
    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.
  2. @LTe
Commits on Apr 26, 2013
  1. @LTe

    Add specs tags for 1.8 specs

    LTe committed Apr 12, 2013