Bug #3590
closedRubyGems is Broken
Description
=begin
Hi,
Rubygems is broken in ruby 1.9.3dev.
This problem can occur in any gems (I expect).
--
The following code reproduces this problem:
begin # Can't load active_record
p require 'active_record'
rescue LoadError => e
p e
end
p ActiveRecord rescue p $! # So it's raise NameError.
p require 'rubygems'
begin # Can load after require 'rubygems'
p require 'active_record' #it returns true
rescue LoadError => e
p e
end
p ActiveRecord rescue p $! #but NameError is raised.
And the result of that code in r28695:
#<LoadError: cannot load such file -- active_record>
#<NameError: uninitialized constant ActiveRecord>
false
true
#<NameError: uninitialized constant ActiveRecord>
In a reference, this is result of that code in ruby1.9.1:
true
ActiveRecord
false
false
ActiveRecord
And more result (ruby -d) available in here: http://gist.github.com/483826
=end