Skip to content
Browse files

Deprecation notices for rbconfig stuff, because we're lazy loading it…

… now, it needs to go soon.
  • Loading branch information...
1 parent 93ac03a commit db11585532aef7a966afbcd59173de8e3eaca7a1 @raggi raggi committed Jul 6, 2010
Showing with 6 additions and 14 deletions.
  1. +3 −14 lib/rbconfig/datadir.rb
  2. +3 −0 lib/rubygems.rb
View
17 lib/rbconfig/datadir.rb
@@ -4,17 +4,6 @@
# 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
-
+warn 'rbconfig/datadir.rb is being deprecated from RubyGems, and will be\
+ removed in a future release. If you wish to rely on a datadir, please\
+ use Gem.datadir, and mark rubygems as a dependency.'
View
3 lib/rubygems.rb
@@ -1089,6 +1089,9 @@ def gem(gem_name, *version_requirements) # :doc:
module Config
def self.datadir(package_name)
+ warn 'RbConfig.datadir is being deprecated from RubyGems, and will be
+removed in a future release. If you wish to rely on a datadir, please
+use Gem.datadir, and mark rubygems as a dependency.'
Gem.datadir(package_name) ||
File.join(Gem::ConfigMap[:datadir], package_name)
end

0 comments on commit db11585

Please sign in to comment.
Something went wrong with that request. Please try again.