[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] fix Ruby 1.9 deprecation warning for Config, use RbConfig

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 11 May 2012 21:58:39 -0400

On Fri, May 11, 2012 at 7:20 PM, Andreas Stieger <andreas.stieger_at_gmx.de> wrote:
> Hello,
>
> [[[
>  fix Ruby 1.9 deprecation warning for Config, use RbConfig
>  * configure.ac
>   replace Config with RbConfig
>  *  build/ac-macros/swig.m4
>  replace Config with RbConfig
> ]]]
>
> The configure script reads the Ruby major and minor version to reject
> configuring swig bindings for Ruby 1.9. It does this by accessing
> Config::CONFIG which is deprecated in that release.
>
> ruby -rrbconfig -e 'print Config::CONFIG.fetch(%q(MAJOR))'
> ruby -rrbconfig -e 'print Config::CONFIG.fetch(%q(MINOR))'
>
> So instead of meaningful message we get:
>
> checking for Ruby major version... -e:1: Use RbConfig instead of
> obsolete and deprecated Config.
> checking for Ruby minor version... -e:1: Use RbConfig instead of
> obsolete and deprecated Config.
>
> The same warning is triggered when trying to configure SWIG_RB_COMPILE
> and SWIG_RB_LINK, although that is moot as these are useless with Ruby
> 1.9 anyway for now. The following works with at least Ruby 1.8:
>
> ruby -rrbconfig -e 'print Config::RbCONFIG.fetch(%q(MAJOR))'
> ruby -rrbconfig -e 'print Config::RbCONFIG.fetch(%q(MINOR))'
>
> This was found during work on the openSUSE package. Please review,
> especially concerning backwards compatibility with Ruby versions older
> than 1.8.

Well... it looks like 1.8.0 was released on Aug 4, 2003. I'm not sure
that we need to test for older versions (tho it wouldn't hurt). But
whatever... more people are going to have 1.9 and hit that warning
message, than people with older Ruby.

+1 for you to commit [1]

Cheers,
-g

[1] http://subversion.apache.org/docs/community-guide/roles.html#partial-commit-access
Received on 2012-05-12 03:59:11 CEST

This is an archived mail posted to the Subversion Dev mailing list.