Michael Henry wrote:
> On Fedora 19, Vim's configure script no longer correctly detects
> the version of Ruby. Vim's current algorithm involves the Ruby
> expression ``RbConfig::CONFIG['ruby_version']``, which returns a
> string such as "1.9.1" on Fedora 17. On Fedora 19, the above
> Ruby expression returns an empty string.
>
> It appears to me that this is due to a change in Fedora. In the
> ticket linked below, the maintainer asserts that querying
> ``ruby_version`` is incorrect, as that variable can have
> arbitrary contents:
> https://bugzilla.redhat.com/show_bug.cgi?id=923703#c1
>
> Empirically, I can verify that the behavior has changed. On
> Fedora 17, the query works:
>
> $ ruby -r rbconfig -e "puts RbConfig::CONFIG['ruby_version']"
> 1.9.1
>
> On Fedora 19, this same query prints the empty string.
>
> The following patch changes the Ruby version detection algorithm
> to check the ``VERSION`` and ``RUBY_VERSION`` variables as used
> earlier in Vim's configure script. Essentially, the query
> becomes::
>
> $ ruby -e "puts ((VERSION rescue RUBY_VERSION))"
> 1.9.3
>
> This works on Fedora 19 as well::
>
> $ ruby -e "puts ((VERSION rescue RUBY_VERSION))"
> 2.0.0
>
> Given that Vim's configure script relies on this same check
> to ensure the version is at least "1.6.0", it seems reasonable
> to me to use this algorithm (though I'm no Ruby expert).
>
>
> Here is the patch against Vim 7.4.14:
Thanks. I cannot think of a reason to first check for the Ruby version
one way and then another way. It works on my system as well.
--
hundred-and-one symptoms of being an internet addict:
48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
higher."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.