diff --git a/ChangeLog b/ChangeLog index fa7e9ef16e..11b0c6e842 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jun 1 15:40:46 2011 Nobuyoshi Nakada + + * tool/rbinstall.rb (gem): fix for rubygems change. + Wed Jun 1 14:07:57 2011 Ryan Davis * lib/minitest/*: MOSTLY Imported minitest 2.2.1 (r6277)... One diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 6234f6fe47..f0a08b8ebd 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -532,14 +532,10 @@ install?(:local, :comm, :man) do end install?(:ext, :comm, :gem) do - directories = [] - IO.foreach(File.join(srcdir, "lib/rubygems.rb")) do |line| - if /^\s*DIRECTORIES\s*=\s*%w\[(.*?)\]/ =~ line - directories = $1.split - break - end - end - gpath = CONFIG["sitelibdir"].sub(%r'/site_ruby/(?=[^/]+)', '/gems/') + $:.unshift(File.join(srcdir, "lib")) + require("rubygems.rb") + gpath = Gem.default_dir + directories = Gem.ensure_gem_subdirectories(gpath) prepare "default gems", gpath, directories destdir = File.join(gpath, directories.grep(/^spec/)[0])