[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

about require

Li Chen

10/20/2006 4:06:00 PM

Hi folks,

In Ruby why do we wirte code as require 'enumerator', instead of
require 'Enumerator' with uppercase? What happens if 'enumerator' is not
saved in the default path that Ruby usually looks for?


Thanks,

Li

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

1 Answer

Aria Stewart

10/20/2006 5:04:00 PM

0

On Sat, 2006-10-21 at 01:06 +0900, Li Chen wrote:
> Hi folks,
>
> In Ruby why do we wirte code as require 'enumerator', instead of
> require 'Enumerator' with uppercase?

Because classes and files don't have a 1:1 mapping, and filesystems on
some systems have case issues.

> What happens if 'enumerator' is not
> saved in the default path that Ruby usually looks for?

Then it won't work unless you alter the path or put it in the right
place.