From: Patrik Sundberg Date: 2001-06-07T18:41:28+09:00 Subject: [ruby-talk:16304] Re: odd obj.send behaviour On Thu, Jun 07, 2001 at 11:10:49AM +0200, ts wrote: > >>>>> "P" == Patrik Sundberg writes: > > P> hmm.. ok. but doesn't undef :gets undefine every occurance of gets from the > P> class - private as well as public? > > You have undefined #gets in RbObjGwHandle, but you call @gw.send(:gets) > > Undef #gets in DRb::DRbObject (i.e. the class of @gw) and it will work. ok. i get it. > P> using eval i seem to end up in Kernel#gets if I don't undef :gets in the > P> server class. I still don't really get this.. > > Same problem with the server. If you don't undef #gets, ruby will try to > call Kernel#gets but this time for the server. ok. i thought my eval("@gw."+methId.to_s) would search only for the public method in the server class? has eval different scoping rules than a normal obj.methodname call? to me it seems so.. -- -----------------------------------------------------------. Patrik Sundberg email: ps@raditex.se || ps@radiac.mine.nu | Phone: +46 13 178567 || +46 707 602240 | .---> UNIX consultant | |-----> Applied Physics and Electrical Engineering student | `----------------------------------------------------------'