aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rbconfig/datadir.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbconfig/datadir.rb')
-rw-r--r--lib/rbconfig/datadir.rb19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/rbconfig/datadir.rb b/lib/rbconfig/datadir.rb
index 554b7fead7..9b7eabb473 100644
--- a/lib/rbconfig/datadir.rb
+++ b/lib/rbconfig/datadir.rb
@@ -4,17 +4,10 @@
# See LICENSE.txt for permissions.
#++
-module RbConfig
-
- ##
- # Return the path to the data directory associated with the given package
- # name. Normally this is just
- # "#{RbConfig::CONFIG['datadir']}/#{package_name}", but may be modified by
- # packages like RubyGems to handle versioned data directories.
-
- def self.datadir(package_name)
- File.join(CONFIG['datadir'], package_name)
- end unless RbConfig.respond_to?(:datadir)
-
-end
+# N.B. This file is used by Config.datadir in rubygems.rb, and must not be
+# removed before that require is removed. I require to avoid warning more than
+# once.
+warn 'rbconfig/datadir.rb and {Rb}Config.datadir is being deprecated from '\
+ 'RubyGems. It will be removed completely on or after June 2011. If you '\
+ 'wish to rely on a datadir, please use Gem.datadir.'