[前][次][番号順一覧][スレッド一覧]

ruby-changes:30104

From: drbrain <ko1@a...>
Date: Thu, 25 Jul 2013 07:16:24 +0900 (JST)
Subject: [ruby-changes:30104] drbrain:r42156 (trunk): * lib/rubygems: Import RubyGems from master as of commit 4ff70cc

drbrain	2013-07-25 07:16:11 +0900 (Thu, 25 Jul 2013)

  New Revision: 42156

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42156

  Log:
    * lib/rubygems:  Import RubyGems from master as of commit 4ff70cc
    * test/rubygems:  ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/remote_fetcher.rb
    trunk/lib/rubygems/test_case.rb
    trunk/test/rubygems/test_gem_ext_ext_conf_builder.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42155)
+++ ChangeLog	(revision 42156)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul 25 07:15:58 2013  Eric Hodel  <drbrain@s...>
+
+	* lib/rubygems:  Import RubyGems from master as of commit 4ff70cc
+	* test/rubygems:  ditto.
+
 Wed Jul 24 20:57:44 2013  Koichi Sasada  <ko1@a...>
 
 	* compile.c (iseq_set_arguments): use RARRAY_RAWPTR() instead of
Index: lib/rubygems/remote_fetcher.rb
===================================================================
--- lib/rubygems/remote_fetcher.rb	(revision 42155)
+++ lib/rubygems/remote_fetcher.rb	(revision 42156)
@@ -325,7 +325,7 @@ class Gem::RemoteFetcher https://github.com/ruby/ruby/blob/trunk/lib/rubygems/remote_fetcher.rb#L325
 
   def request(uri, request_class, last_modified = nil)
     request = Gem::Request.new uri, request_class, last_modified, @proxy
-
+    
     request.fetch do |req|
       yield req if block_given?
     end
Index: lib/rubygems/test_case.rb
===================================================================
--- lib/rubygems/test_case.rb	(revision 42155)
+++ lib/rubygems/test_case.rb	(revision 42156)
@@ -1,5 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L1
 # TODO: $SAFE = 1
 
+begin
+  gem 'minitest', '~> 4.0'
+rescue NoMethodError
+  # for ruby tests
+end
+
 if defined? Gem::QuickLoader
   Gem::QuickLoader.load_full_rubygems_library
 else
@@ -220,8 +226,8 @@ class Gem::TestCase < MiniTest::Unit::Te https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L226
     ENV["GEM_SPEC_CACHE"] = File.join @tempdir, 'spec_cache'
 
     @orig_ruby = if ENV['RUBY'] then
-                   ruby = Gem.instance_variable_get :@ruby
-                   Gem.instance_variable_set :@ruby, ENV['RUBY']
+                   ruby = Gem.ruby
+                   Gem.ruby = ENV['RUBY']
                    ruby
                  end
 
@@ -310,8 +316,7 @@ class Gem::TestCase < MiniTest::Unit::Te https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L316
     ENV['GEM_HOME'] = @orig_gem_home
     ENV['GEM_PATH'] = @orig_gem_path
 
-    _ = @orig_ruby
-    Gem.instance_variable_set :@ruby, @orig_ruby if @orig_ruby
+    Gem.ruby = @orig_ruby if @orig_ruby
 
     if @orig_ENV_HOME then
       ENV['HOME'] = @orig_ENV_HOME
Index: test/rubygems/test_gem_ext_ext_conf_builder.rb
===================================================================
--- test/rubygems/test_gem_ext_ext_conf_builder.rb	(revision 42155)
+++ test/rubygems/test_gem_ext_ext_conf_builder.rb	(revision 42156)
@@ -120,8 +120,13 @@ checking for main\(\) in .*?nonexistent/ https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_ext_conf_builder.rb#L120
       extconf.puts <<-'EXTCONF'
 include RbConfig
 
-ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}"
-ruby = File.join CONFIG['bindir'], ruby_exe
+ruby =
+  if ENV['RUBY'] then
+    ENV['RUBY']
+  else
+    ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}"
+    File.join CONFIG['bindir'], ruby_exe
+  end
 
 open 'Makefile', 'w' do |io|
   io.write <<-Makefile

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]