From: David Alan Black Date: 2001-03-05T22:19:11+09:00 Subject: [ruby-talk:12012] Re: How do I reach members from a Proc? On Mon, 5 Mar 2001, Stephen White wrote: > On Mon, 5 Mar 2001, Yukihiro Matsumoto wrote: > > > |I'm inclined to agree. However, given that instance_eval already > > |exists (and will continue to IIUC), how about something more like > > |'block_eval_and_call' for PMC (principle of mnemonic consistency) and > > |POLS (principle of least shock, err, surprise). > > > > Thinking of what it does (switch the value of self, then evaluate > > block, nothing more), these names are too much, I feel.. > > For me, "eval" already includes the concept of calling, so I feel that > "block_eval" says enough for me to find (and remember) it. To me, though, block_eval doesn't signal the switching of self. Not that I have any brilliant ideas here.... Something with "context" in it, maybe? instance_context? context_eval? context_adopt? Is there likely to be something parallel for module_eval? I'm also trying to picture exactly what the syntax would be. I think I'm not quite getting it. Can someone write one or two examples of ways you would use this? David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav