1module ::RbConfig
2  module Obsolete
3  end
4  class << Obsolete
5    def _warn_
6      loc, = caller_locations(2, 1)
7      loc = "#{loc.to_s}: " if loc
8      warn "#{loc}Use RbConfig instead of obsolete and deprecated Config."
9      self
10    end
11
12    def const_missing(name)
13      _warn_
14      ::RbConfig.const_get(name)
15    end
16
17    def method_missing(*args, &block)
18      _warn_
19      rbconfig = ::RbConfig
20      result = rbconfig.__send__(*args, &block)
21      result = rbconfig if rbconfig.equal?(result)
22      result
23    end
24
25    def respond_to_missing?(*args, &block)
26      _warn_
27      ::RbConfig.send(:respond_to_missing?, *args, &block)
28    end
29  end
30end
31
32::Config = ::RbConfig::Obsolete._warn_
33=begin
34def Object.const_missing(name)
35  return super unless name == :Config
36  ::RbConfig::Obsolete._warn_
37end
38=end
39