On 08/03/2013 08:59 PM, James McCoy wrote:
> Notice how the version number here doesn't match the version number in
> the previous command?  RbConfig::CONFIG['ruby_version'] reports the API
> version, while VERSION/RUBY_VERSION report the release version.
>
> $ ruby --version
> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
> $ ruby -e 'puts ((VERSION rescue RUBY_VERSION))'
> 1.9.3
> $ ruby -r rbconfig -e "puts RbConfig::CONFIG['ruby_version']"
> 1.9.1
>
> What Vim needs to know is the API version, not the release version.

Thanks - that's informative.  Would RUBY_VERSION and
ruby_version ever differ in their major.minor values?  Vim's
configure script concatenates the major and minor number to get
a single integer (19 or 20 for 1.9.x or 2.0.y), ignoring the
third number entirely.  If the API and release versions can
differ in their major.minor value, then as you say, this patch
to use RUBY_VERSION wouldn't work.  If there is not another way
to query the API version (which I could believe), then it seems
that Fedora 19's build of Ruby is broken, since 'ruby_version'
is set to an empty string on that platform::

  [root@fedora19 ~]# ruby -r rbconfig -e "puts
RbConfig::CONFIG['ruby_version']"

  [root@fedora19 ~]#

I'm not very familiar with Ruby, so before I reopen the below
Fedora ticket (which the maintainer marked "CLOSED NOTABUG"),
would you be able to point me at some official Ruby
documentation that requires 'ruby_version' to contain something
useful?  My searching didn't show anything I could recognize as
authoritative.

This is the Fedora ticket in question:
https://bugzilla.redhat.com/show_bug.cgi?id=923703

The comment from the maintainer is:

"""
>From Vít Ondruch 2013-03-20 07:10:25 EDT

You are right. That is coming into that place due to
"--with-ruby-version=''" configuration option. Since you can
specify there any arbitrary string (if I am not mistaken) using
that option, I don't think you get what you want.

I am going to reject this issue. If you disagree then we can
consider upstream report. Also, if you provide me with your use
case, we might find some better option.
"""

I don't understand why Vít talks about an "upstream report",
since that makes it seems like something the Ruby project itself
would need to address; but if Ruby installations are expected to
provide an API version for 'ruby_version' and I can point at
some documentation that says so, I'll reopen the Fedora ticket.

Thanks for any help,
Michael Henry

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to