Author: pburba
Date: Wed May  8 16:40:36 2013
New Revision: 1480344

URL: http://svn.apache.org/r1480344
Log:
Properly detect Ruby 1.9 on Windows.

* build/generator/gen_win.py:
  (WinGeneratorBase._find_ruby): Pass the -W0 option to ruby.exe to stifle
   the warning about Config being deprecated and that RbConfig should be
   used.  Ruby just uses RbConfig anyway.

Modified:
    subversion/trunk/build/generator/gen_win.py

Modified: subversion/trunk/build/generator/gen_win.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1480344&r1=1480343&r2=1480344&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Wed May  8 16:40:36 2013
@@ -1253,7 +1253,9 @@ class WinGeneratorBase(GeneratorBase):
     self.ruby_version = None
     self.ruby_major_version = None
     self.ruby_minor_version = None
-    proc = os.popen('ruby -rrbconfig -e ' + escape_shell_arg(
+    # Pass -W0 to stifle the "-e:1: Use RbConfig instead of obsolete
+    # and deprecated Config." warning if we are using Ruby 1.9.
+    proc = os.popen('ruby -rrbconfig -W0 -e ' + escape_shell_arg(
                     "puts Config::CONFIG['ruby_version'];"
                     "puts Config::CONFIG['LIBRUBY'];"
                     "puts Config::CONFIG['archdir'];"


Reply via email to