[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

IRB require issues

guest

7/6/2007 1:30:00 AM

is there a reason why saying require 'net/http' would return false?

i've been trying to figure out what's wrong with my installation, but i
see no reason why it refuses to load that one library, it works for
everything else i can think of...

thanks

--
Posted via http://www.ruby-....

2 Answers

diego scataglini

7/6/2007 1:41:00 AM

0

False means that's already required.

Diego Scataglini

On Jul 5, 2007, at 9:29 PM, Guest <Guest@bugmenot.com> wrote:

> is there a reason why saying require 'net/http' would return false?
>
> i've been trying to figure out what's wrong with my installation,
> but i
> see no reason why it refuses to load that one library, it works for
> everything else i can think of...
>
> thanks
>
> --
> Posted via http://www.ruby-....
>

Todd Benson

7/6/2007 1:42:00 AM

0

On 7/5/07, Guest <Guest@bugmenot.com> wrote:
> is there a reason why saying require 'net/http' would return false?
>
> i've been trying to figure out what's wrong with my installation, but i
> see no reason why it refuses to load that one library, it works for
> everything else i can think of...
>
> thanks

Usually, this is because it is already loaded ...

irb(main):001:0> $LOADED_FEATURES.grep /net/
=> ["net/protocol.rb", "net/http.rb"]
irb(main):002:0> require 'net/http' #already loaded, so should return false
=> false

hth,
Todd