On 11 Sep 2005, at 22:10, Jim Weirich wrote:

> On Sunday 11 September 2005 03:46 pm, Phil Tomson wrote:
>
>> In article <IJXUe.3397$S26.923 / tornado.texas.rr.com>,
>>
>> itsme213 <itsme213 / hotmail.com> wrote:
>>
>>> When requiring a gem with
>>>  require 'gemname'
>>>
>>> I seem to get a consistent return of "false", even when the gem  
>>> has been
>>> loaded successfully. This does not match the spec of 'require'.
>
> I'm not seeing this ...
>
> $ irb --simple-prompt
>> require 'rake'
>     => true
>> require 'rake'
>     => false

$ cat x.rb
puts "rubygems: #{require 'rubygems'}"
puts "active_record: #{require 'active_record'}"
puts "required? #{defined? ActiveRecord}"
puts "RubyGemsVersion: #{Gem::RubyGemsVersion}"
$ ruby x.rb
rubygems: true
active_record: false
required? constant
RubyGemsVersion: 0.8.10

I also see this behavior when required files can't be loaded.   
Sparklines requires RMagick, but if RMagick isn't available (I moved  
it aside) then no LoadError is given.

[11:16] drbrain@kaa$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'sparklines'
=> false
irb(main):003:0> Sparklines.plot([1,2])
NameError: uninitialized constant Sparklines
         from (irb):3

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04