James Vega wrote:
> On Thu, Feb 18, 2010 at 01:55:52PM +0100, Bram Moolenaar wrote:
> >
> > Michael Henry wrote:
> >
> > > On 02/17/2010 10:23 AM, Bram Moolenaar wrote:
> > > >
> > > > Patch 7.2.361
> > > > Problem: Ruby 1.9 is not supported.
> > > > Solution: Add Ruby 1.9 support. (Msaki Suketa)
> > > > Files: src/Makefile, src/auto/configure, src/configure.in,
> > > > src/if_ruby.c
> > >
> > > Bram,
> > >
> > > Something about this patch isn't quite right, though I don't
> > > yet know what. It differs in a number of ways from Masaki Suketa's
> > > patch (note typo "Msaki" in Solution: line above). I can build 7.2.360
> > > with Masaki's patch and it still works for me on Fedora 11. I haven't
> > > yet gotten to try it on Arch with Ruby 1.9.
> > >
> > > I can build 7.2.361, but it's giving me odd errors in the Ruby-based
> > > plugin I'm using:
> > >
> > > IndexError: (eval):1063:in `append': NULL line
> > >
> > > (This is the LustyExplorer plugin.)
> > >
> > > I've attached a diff between 7.2.360 with Masaki's original
> > > patch and 7.2.361, in case that helps point out the difference
> > > that's causing the trouble.
> >
> > I don't have Fedora 11 thus I can't try it out. It builds find for me
> > on Ubuntu 9.10, but I haven't tried running any Ruby script.
>
> It's building fine for Michael too. The issue is at runtime.
>
> > Can you make a diff with "diff -w"? And not include the .orig file or
> > auto/configure file.
> >
> > I don't think I changed any of the logic compared to the original patch,
> > at least not intentional.
>
> The change in logic is below:
>
> > diff -Naur vim72.360.rubypatch/src/if_ruby.c vim72.361/src/if_ruby.c
> > --- vim72.360.rubypatch/src/if_ruby.c 2010-02-18 06:48:21.000000000 -0500
> > +++ vim72.361/src/if_ruby.c 2010-02-18 06:44:32.000000000 -0500
> > @@ -864,7 +869,10 @@
> > long n = NUM2LONG(num);
> > aco_save_T aco;
> >
> > - if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL)
> > + if (line != NULL) {
>
> This condition should have been changed to "line == NULL" when it was
> made its own, standalone check.
Ah, good catch. I'll send out a patch.
Would be nice to have a test for the basic Ruby stuff, so that things
like this are caught early.
--
Vi is clearly superior to emacs, since "vi" has only two characters
(and two keystrokes), while "emacs" has five. (Randy C. Ford)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php