This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
texlive: silence Ruby 1.9 warnings
- From: Yaakov (Cygwin/X) <yselkowitz at users dot sourceforge dot net>
- To: cygwin-apps <cygwin-apps at cygwin dot com>
- Date: Tue, 8 Jan 2013 19:46:23 -0600
- Subject: texlive: silence Ruby 1.9 warnings
Ken,
The attached patch silences Ruby 1.9 deprecation warnings in
texlive-collection-context. (It is still compatible with at least
later 1.8 versions.) Could you please include it whenever you next
update collection-context?
TIA,
Yaakov
--- origsrc/texmf-dist/scripts/context/ruby/base/kpse.rb 2011-06-01 03:54:21.000000000 -0500
+++ src/texmf-dist/scripts/context/ruby/base/kpse.rb 2013-01-08 19:40:44.219490700 -0600
@@ -61,7 +61,7 @@ module Kpse
@@tracing = false
@@distribution = 'web2c'
@@crossover = true
- @@mswindows = Config::CONFIG['host_os'] =~ /mswin/
+ @@mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
# @@distribution = 'miktex' if ENV['PATH'] =~ /miktex[\\\/]bin/o
--- origsrc/texmf-dist/scripts/context/ruby/base/switch.rb 2007-01-12 05:44:15.000000000 -0600
+++ src/texmf-dist/scripts/context/ruby/base/switch.rb 2013-01-08 19:40:51.788923700 -0600
@@ -18,7 +18,7 @@
require "rbconfig"
-$mswindows = Config::CONFIG['host_os'] =~ /mswin/
+$mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
$separator = File::PATH_SEPARATOR
class String
--- origsrc/texmf-dist/scripts/context/ruby/base/system.rb 2008-06-12 05:42:53.000000000 -0500
+++ src/texmf-dist/scripts/context/ruby/base/system.rb 2013-01-08 19:40:55.214119600 -0600
@@ -12,7 +12,7 @@ require "rbconfig"
module System
- @@mswindows = Config::CONFIG['host_os'] =~ /mswin/
+ @@mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
@@binpaths = ENV['PATH'].split(File::PATH_SEPARATOR)
@@binsuffixes = if $mswindows then ['.exe','.com','.bat'] else ['','.sh','.csh'] end
@@located = Hash.new
--- origsrc/texmf-dist/scripts/context/ruby/base/tool.rb 2009-08-23 06:11:32.000000000 -0500
+++ src/texmf-dist/scripts/context/ruby/base/tool.rb 2013-01-08 19:40:59.180346400 -0600
@@ -159,7 +159,7 @@ module Tool
end
- if Config::CONFIG['host_os'] =~ /mswin/ then
+ if RbConfig::CONFIG['host_os'] =~ /mswin/ then
require 'Win32API'
--- origsrc/texmf-dist/scripts/context/ruby/fcd_start.rb 2011-06-01 03:54:21.000000000 -0500
+++ src/texmf-dist/scripts/context/ruby/fcd_start.rb 2013-01-08 19:41:02.339527100 -0600
@@ -57,7 +57,7 @@ class FastCD
exit unless @@rootpath
- @@mswindows = Config::CONFIG['host_os'] =~ /mswin/
+ @@mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
@@maxlength = 26
require 'Win32API' if @@mswindows
--- origsrc/texmf-dist/scripts/context/ruby/runtools.rb 2009-08-23 06:11:32.000000000 -0500
+++ src/texmf-dist/scripts/context/ruby/runtools.rb 2013-01-08 19:41:05.581712600 -0600
@@ -65,7 +65,7 @@ class Job
end
def platform
- case Config::CONFIG['host_os']
+ case RbConfig::CONFIG['host_os']
when /mswin/ then :windows
else :unix
end
--- origsrc/texmf-dist/scripts/context/ruby/texmfstart.rb 2011-06-01 03:54:21.000000000 -0500
+++ src/texmf-dist/scripts/context/ruby/texmfstart.rb 2013-01-08 19:41:08.973906600 -0600
@@ -135,7 +135,7 @@ end
# kpse_merge_stop
-$mswindows = Config::CONFIG['host_os'] =~ /mswin/
+$mswindows = RbConfig::CONFIG['host_os'] =~ /mswin/
$separator = File::PATH_SEPARATOR
$version = "2.1.0"
$ownpath = File.dirname($0)
--- origsrc/texmf-dist/scripts/context/ruby/texsync.rb 2008-06-12 05:42:53.000000000 -0500
+++ src/texmf-dist/scripts/context/ruby/texsync.rb 2013-01-08 19:41:14.074198300 -0600
@@ -140,7 +140,7 @@ class Commands
texpaths = ['texmf','texmf-local','texmf-fonts','texmf-mswin','texmf-linux','texmf-macos']
elsif option('terse') then
texpaths = ['texmf','texmf-local','texmf-fonts']
- case Config::CONFIG['host_os'] # or: Tool.ruby_platform
+ case RbConfig::CONFIG['host_os'] # or: Tool.ruby_platform
when /mswin/ then texpaths.push('texmf-mswin')
when /linux/ then texpaths.push('texmf-linux')
when /darwin/ then texpaths.push('texmf-macosx')