|
Re: Q) about singleton methods and access control: msg#01155lang.ruby.general
Christoph wrote: "Bennett, Patrick" wroteNo it's not. I was calling testObj.xxxxx - that's definitely an "instance" level call. :\ Arrgggh.... --- This example makes no sense to me at all. What exactly are you testing? Why would you think 'self' would change in the middle of a method? Why aren't you calling an instance method of obj (that you created in the singleton method)? That's the whole point of this issue. The fact that singleton's can't create an >instance< and call that >instance's< private >instance< method (as in C++) - since the singleton is technically a member of the class, and should be able to workin within its security constraints. Apparently, Ruby just doesn't support it. Fine, I can live with it. I'm still curious as to 'why' though - since it's seems to be an odd ommision. # versusI will..... thanks. :> (even though it seems a strange hack)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Q) about singleton methods and access control, Christoph |
|---|---|
| Next by Date: | class === class often false?, Bill Kelly |
| Previous by Thread: | Re: Q) about singleton methods and access control, Christoph |
| Next by Thread: | Re: Q) about singleton methods and access control, Kent Dahl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |