From: Robert Dober Date: 2007-10-04T20:39:06+09:00 Subject: Re: @continuation vs callcc {} On 10/4/07, Logan Capaldo wrote: > On 10/4/07, Robert Dober wrote: > > On 10/3/07, Logan Capaldo wrote: > > > I don't know you're getting much benefit from the apparent > > > contiuationess of this so much as the captured binding. I think you > > > get the same effect from something like the following > > > > > > def bnd > > > @b ||= binding > > > end > > > > > > def vi > > > system "vim #{file.path}" > > > eval(file.read, bnd) > > > end > > > > Hmm Logan your solution does not seem to save state, I tried > > vi > > -->@a=1 > > -->:wq > > vi > > -->p @a > > --> :wq > > nil > > > > I have no clue where the problem is. > > Interesting. I'm a little surprised but not very surprised. I wasn't > sure if that would work, and at the time I had no ruby to test with. > Sorry Logan, I just fixed it, and when fixing it I found it strange and retested your solution, which ... works perfectly! Need new glasses, sorry! Robert