[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Modules and classes have a 'load' private method?

Asfand Yar Qazi

2/20/2005 6:02:00 PM

Hi,

If I do a 'class C; end; C.load' I get something about a private
method: huh? I've been defining loads of my own 'load' methods in my
own classes: why can't I find this fact in documentation? Is this a
problem if I do this?

Thanks,
Asfand Yar
2 Answers

Florian Gross

2/20/2005 6:15:00 PM

0

Asfand Yar Qazi wrote:

> If I do a 'class C; end; C.load' I get something about a private method:
> huh? I've been defining loads of my own 'load' methods in my own
> classes: why can't I find this fact in documentation? Is this a problem
> if I do this?

It's in all objects because Object includes Kernel. See Kernel#load.

It will only be a problem if you want to use Kernel#load via the load()
name in your class which is quite unlikely.

Asfand Yar Qazi

2/20/2005 6:41:00 PM

0

Florian Gross wrote:
>
> It's in all objects because Object includes Kernel. See Kernel#load.
>
> It will only be a problem if you want to use Kernel#load via the load()
> name in your class which is quite unlikely.

Ah... good to know :-)