Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > about require

Reply
Thread Tools

about require

 
 
Li Chen
Guest
Posts: n/a
 
      10-20-2006
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-forum.com/.

 
Reply With Quote
 
 
 
 
Aredridel
Guest
Posts: n/a
 
      10-20-2006
--=-iAIJ8rHcIZhKQdglXDMO
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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


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=20
> 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.

--=-iAIJ8rHcIZhKQdglXDMO
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFOQGPtP09exA3hooRAj59AJ9//b00zPZg0dh16yxkxS2r/mdxKQCfRRTa
j1m2JJwIvhOtYg25Q7lT0io=
=IEfa
-----END PGP SIGNATURE-----

--=-iAIJ8rHcIZhKQdglXDMO--

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do networked PCs require the Internet? M.L. Wireless Networking 5 04-01-2005 02:48 AM
Firefox and RSS feeds that require authentication ttfg Firefox 0 03-25-2005 11:51 PM
Problem with "require" and multiple modules. Don Perl 2 12-10-2003 10:15 AM
Re: Why does using keyword require a new scope? Jip from Paris ASP .Net 0 08-25-2003 08:02 AM
Re: Why does using keyword require a new scope? Herman Eldering ASP .Net 0 08-23-2003 11:32 PM



Advertisments