Skip to content

Commit

Permalink
Do not require 'rubygems' from 'rubygems/ext'
Browse files Browse the repository at this point in the history
RubyGems checks all gems for requirable files it can load matching the
given name.  If a gem requires extension building RubyGems could enter a
state where Gem::Ext was not yet loaded (because rubygems/ext was
partially loaded) which would result in a missing constant exception.

Now RubyGems assumes that module Gem exists when rubygems/ext is loaded.
This avoids the problem of a missing Gem::Ext and allows checking for
requirable files to proceed properly.

Bug discovered by Koichi Sasada.
  • Loading branch information
drbrain committed Oct 16, 2013
1 parent 5a85859 commit b955554
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/rubygems/ext.rb
Expand Up @@ -4,8 +4,6 @@
# See LICENSE.txt for permissions.
#++

require 'rubygems'

##
# Classes for building C extensions live here.

Expand Down

0 comments on commit b955554

Please sign in to comment.