-----BEGIN PGP SIGNED MESSAGE-----

In article <200208012333.g71NXWiG001635 / miso.k.notwork.org>,
GOTO Kentaro  <gotoken / notwork.org> wrote:
>At Fri, 2 Aug 2002 07:33:03 +0900,
><bbense+comp.lang.ruby.Aug.01.02 / telemark.stanford.edu> wrote:
>
>>     When writing libraries for other programs to use
>> is it better to include any outside requirements 
>> within the Class definition or outside it? i.e. 
>> 
>> [1]
>> require "foo"
>> 
>> Class Bar
>> 
>> end 
>> 
>> or 
>> 
>> [2]
>> Class Bar
>>       require "foo"
>> 
>> end 
>
>[1] and [2] have the same effect for ruby interpreter at all because
>namespace will not be nested by `require' or `load'.
>

- - So require is not just a "smart" include, but something that
works at the language level[1]. If I understand you correctly,
you can only "hide" a class definition in another class by
keeping it in the same file. Thanks for the clarification.
I keep having to "unlearn" my C and Perl intiutions. ( One
of the things that attracted me to Ruby in the first place.)

- - Booker C. Bense

[1]- It's a command not a preprocessor. 

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBPUrGTwD83u1ILnWNAQE/PwQAmfBEe/jmqfi5ALm4jweNGjac/dJ6hI+P
zVXgGeImSWEJs7kVKiaoBL0cHJhzhQyIiVlaiJU910F0aAjkxAK0NHcOuoEyZwQ0
unrQv1ZbAMe5vbzyssoXVcVvawOFR+HC2R+FAxt6eLzmMnIuktc9CdFAecX/v52F
tIH4/MzglHY=
=DgZe
-----END PGP SIGNATURE-----
--