rubinius/rubinius — pull request #2659 by mislav (2013-10-06 10:26:27+00:00)
Title: Allow RUBYLIB in build scripts

These checks were added to guard against the case where a user might have e.g. "lib:test" in their RUBYLIB at build time, which would result in erraneously loading Rubinius' local `lib/rbconfig.rb` or `lib/rubygems.rb` instead of ones from MRI that's doing the build.

The above was my understanding of those checks. Please correct me if I'm wrong.

Since `lib/rbconfig.rb` already has a guard against this, and MRI 1.9+ loads `rubygems.rb` automatically at runtime, tripping over the guard in `rbconfig.rb` immediately *before* the RUBYLIB check even happens, the explicit `ENV["RUBYLIB"]` check is both unnecessary and unwanted since it prevents valid uses of RUBYLIB. The check also failed to account for the fact that extra load paths might have been added via RUBYOPT as well.

I have several valid uses of RUBYLIB in my environment, one of which is an rbenv plugin that sets RUBYLIB each time the ruby interpreter is invoked, and it hurts me that Rubinius decides to abort the build process, forcing me to unset RUBYLIB in both my shell and by manually disabling the rbenv plugin.

Reverts af5cae6519169841ca8bc97d7501e2ac707b47d7, 16d3c35a46455157581188f6766b722c98c659fa
References d4793b518bfd8f6c52553ff5694263c577230359