On Mon, Sep 18, 2006 at 01:50:36AM +0900, Logan Capaldo wrote:
> On Sun, Sep 17, 2006 at 08:01:17PM +0900, Josef Wolf wrote:
> > I have not tried his example because I assumed the library could not be
> > loaded.  I was confused by the fact that "require 'readline'" returns
> > "false".  Isn't require supposed to return "true" if successful?
> The return value of require is borderline meaningless. If require
> returns false, that just means that the file has already been require'd.

Are you sure with this?  I get false even on the _first_ require.

> If it can't require the file for whatever reason it will raise and
> exception, not return false.

Maybe this should be mentioned in the documentation?  Currently, it says:

     Ruby tries to load the library named _string_, returning +true+ if
     successful.  [ ... ]