~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to lib/rbconfig/datadir.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# See LICENSE.txt for permissions.
5
5
#++
6
6
 
7
 
module RbConfig
8
 
 
9
 
  ##
10
 
  # Return the path to the data directory associated with the given package
11
 
  # name.  Normally this is just
12
 
  # "#{RbConfig::CONFIG['datadir']}/#{package_name}", but may be modified by
13
 
  # packages like RubyGems to handle versioned data directories.
14
 
 
15
 
  def self.datadir(package_name)
16
 
    File.join(CONFIG['datadir'], package_name)
17
 
  end unless RbConfig.respond_to?(:datadir)
18
 
 
19
 
end
20
 
 
 
7
# N.B. This file is used by Config.datadir in rubygems.rb, and must not be
 
8
# removed before that require is removed. I require to avoid warning more than
 
9
# once.
 
10
 
 
11
warn 'rbconfig/datadir.rb and {Rb}Config.datadir is being deprecated from '\
 
12
 'RubyGems. It will be removed completely on or after June 2011. If you '\
 
13
 'wish to rely on a datadir, please use Gem.datadir.'