Sha256: 01827b8270366c2575c3c0503f611add355976851b2ba89fe153b2ea1d227fdd

Contents?: true

Size: 706 Bytes

Versions: 7

Compression:

Stored size: 706 Bytes

Contents

wd = Dir.pwd()
metaconfig_dir = File.join(File.dirname(__FILE__), '..')
Dir.chdir metaconfig_dir
begin
  $: << '.' # TODO: hack
  require 'setup'
  require 'rbconfig'
  if not defined?(RbConfig) then
    RbConfig = Config
  end
  config = ConfigTable.new(RbConfig::CONFIG)
  config.load_standard_entries
  config.load_script 'metaconfig'
  config.load_savefile
ensure
  Dir.chdir(wd)
end

RUBY_SOURCE_DIR = config['ruby-source-path']
RUBY_INCLUDE_DIR = config['ruby-include-path']
USING_CACHED_FILES = config['cached-files'] == 'yes'

if __FILE__ == $0 then
  puts "Using cached files: #{USING_CACHED_FILES}"
  puts "Ruby source dir: #{RUBY_SOURCE_DIR}"
  puts "Ruby include dir: #{RUBY_INCLUDE_DIR}"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-internal-0.8.5 ext/ruby_source_dir.rb
ruby-internal-0.8.4 ext/ruby_source_dir.rb
ruby-internal-0.8.3 ext/ruby_source_dir.rb
ruby-internal-0.8.2 ext/ruby_source_dir.rb
ruby-internal-0.8.1 ext/ruby_source_dir.rb
ruby-internal-0.8.0 ext/ruby_source_dir.rb
ruby-internal-0.7.3 ext/ruby_source_dir.rb