Robert Dober
10/4/2007 11:39:00 AM
On 10/4/07, Logan Capaldo <logancapaldo@gmail.com> wrote:
> On 10/4/07, Robert Dober <robert.dober@gmail.com> wrote:
> > On 10/3/07, Logan Capaldo <logancapaldo@gmail.com> 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