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

ruby-changes:27743

From: nagachika <ko1@a...>
Date: Sun, 17 Mar 2013 23:53:46 +0900 (JST)
Subject: [ruby-changes:27743] nagachika:r39795 (ruby_2_0_0): merge revision(s) 39597: [Backport #7991]

nagachika	2013-03-17 23:53:31 +0900 (Sun, 17 Mar 2013)

  New Revision: 39795

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

  Log:
    merge revision(s) 39597: [Backport #7991]
    
    * lib/rubygems.rb:  Bump version to 2.0.1 for upcoming bugfix release
    
    * lib/rubygems/ext/ext_conf_builder.rb:  Restore ruby 1.8 compatibility
      for [Bug #9698]
    
    * test/rubygems/test_gem_installer.rb:  Ditto.
    
    * lib/rubygems/package.rb:  Restore ruby 1.8 compatibility.
    
    * test/rubygems/test_gem_dependency_installer.rb:  Fix warnings

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/lib/rubygems/ext/ext_conf_builder.rb
    branches/ruby_2_0_0/lib/rubygems/package.rb
    branches/ruby_2_0_0/lib/rubygems.rb
    branches/ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb
    branches/ruby_2_0_0/test/rubygems/test_gem_installer.rb
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 39794)
+++ ruby_2_0_0/ChangeLog	(revision 39795)
@@ -1,3 +1,15 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sun Mar 17 23:53:19 2013  Eric Hodel  <drbrain@s...>
+
+	* lib/rubygems.rb:  Bump version to 2.0.1 for upcoming bugfix release
+
+	* lib/rubygems/ext/ext_conf_builder.rb:  Restore ruby 1.8 compatibility
+	  for [Bug #9698]
+	* test/rubygems/test_gem_installer.rb:  Ditto.
+
+	* lib/rubygems/package.rb:  Restore ruby 1.8 compatibility.
+
+	* test/rubygems/test_gem_dependency_installer.rb:  Fix warnings
+
 Sun Mar 17 23:36:05 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems/available_set.rb:  Undent for style
Index: ruby_2_0_0/lib/rubygems/ext/ext_conf_builder.rb
===================================================================
--- ruby_2_0_0/lib/rubygems/ext/ext_conf_builder.rb	(revision 39794)
+++ ruby_2_0_0/lib/rubygems/ext/ext_conf_builder.rb	(revision 39795)
@@ -13,41 +13,45 @@ class Gem::Ext::ExtConfBuilder < Gem::Ex https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/rubygems/ext/ext_conf_builder.rb#L13
   FileEntry = FileUtils::Entry_ # :nodoc:
 
   def self.build(extension, directory, dest_path, results, args=[])
-    tmp_dest = (Dir.mktmpdir(".gem.", ".") if File.identical?(dest_path, "."))
+    tmp_dest = Dir.mktmpdir(".gem.", ".") if File.identical?(dest_path, ".")
 
-    siteconf = Tempfile.open(%w"siteconf .rb", ".") do |f|
-      f.puts "require 'rbconfig'"
-      f.puts "dest_path = #{(tmp_dest || dest_path).dump}"
+    Tempfile.open %w"siteconf .rb", "." do |siteconf|
+      siteconf.puts "require 'rbconfig'"
+      siteconf.puts "dest_path = #{(tmp_dest || dest_path).dump}"
       %w[sitearchdir sitelibdir].each do |dir|
-        f.puts "RbConfig::MAKEFILE_CONFIG['#{dir}'] = dest_path"
-        f.puts "RbConfig::CONFIG['#{dir}'] = dest_path"
+        siteconf.puts "RbConfig::MAKEFILE_CONFIG['#{dir}'] = dest_path"
+        siteconf.puts "RbConfig::CONFIG['#{dir}'] = dest_path"
       end
-      f
-    end
 
-    rubyopt = ENV["RUBYOPT"]
-    ENV["RUBYOPT"] = ["-r#{siteconf.path}", rubyopt].compact.join(' ')
-    cmd = [Gem.ruby, File.basename(extension), *args].join ' '
+      siteconf.flush
+
+      rubyopt = ENV["RUBYOPT"]
+      destdir = ENV["DESTDIR"]
+
+      begin
+        ENV["RUBYOPT"] = ["-r#{siteconf.path}", rubyopt].compact.join(' ')
+        cmd = [Gem.ruby, File.basename(extension), *args].join ' '
 
-    run cmd, results
+        run cmd, results
 
-    destdir = ENV["DESTDIR"]
-    ENV["DESTDIR"] = nil
+        ENV["DESTDIR"] = nil
 
-    make dest_path, results
+        make dest_path, results
 
-    if tmp_dest
-      FileEntry.new(tmp_dest).traverse do |ent|
-        destent = ent.class.new(dest_path, ent.rel)
-        destent.exist? or File.rename(ent.path, destent.path)
+        if tmp_dest
+          FileEntry.new(tmp_dest).traverse do |ent|
+            destent = ent.class.new(dest_path, ent.rel)
+            destent.exist? or File.rename(ent.path, destent.path)
+          end
+        end
+
+        results
+      ensure
+        ENV["RUBYOPT"] = rubyopt
+        ENV["DESTDIR"] = destdir
       end
     end
-
-    results
   ensure
-    ENV["RUBYOPT"] = rubyopt
-    ENV["DESTDIR"] = destdir
-    siteconf.close(true) if siteconf
     FileUtils.rm_rf tmp_dest if tmp_dest
   end
 
Index: ruby_2_0_0/lib/rubygems/package.rb
===================================================================
--- ruby_2_0_0/lib/rubygems/package.rb	(revision 39794)
+++ ruby_2_0_0/lib/rubygems/package.rb	(revision 39795)
@@ -387,8 +387,9 @@ EOM https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/rubygems/package.rb#L387
       @spec = Gem::Specification.from_yaml entry.read
     when 'metadata.gz' then
       args = [entry]
-      args << { :external_encoding => Encoding::UTF_8 } unless
-        Zlib::GzipReader.method(:wrap).arity == 1
+      args << { :external_encoding => Encoding::UTF_8 } if
+        Object.const_defined?(:Encoding) &&
+          Zlib::GzipReader.method(:wrap).arity != 1
 
       Zlib::GzipReader.wrap(*args) do |gzio|
         @spec = Gem::Specification.from_yaml gzio.read
Index: ruby_2_0_0/lib/rubygems.rb
===================================================================
--- ruby_2_0_0/lib/rubygems.rb	(revision 39794)
+++ ruby_2_0_0/lib/rubygems.rb	(revision 39795)
@@ -8,7 +8,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/rubygems.rb#L8
 require 'rbconfig'
 
 module Gem
-  VERSION = '2.0.0'
+  VERSION = '2.0.1'
 end
 
 # Must be first since it unloads the prelude from 1.9.2
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 39794)
+++ ruby_2_0_0/version.h	(revision 39795)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-03-17"
-#define RUBY_PATCHLEVEL 64
+#define RUBY_PATCHLEVEL 65
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb
===================================================================
--- ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb	(revision 39794)
+++ ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb	(revision 39795)
@@ -37,7 +37,7 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb#L37
 
   def test_available_set_for_name
     util_setup_gems
-    p1a, gem = util_gem 'a', '10.a'
+    p1a, = util_gem 'a', '10.a'
     util_setup_spec_fetcher p1a, @a1, @a1_pre
 
     inst = Gem::DependencyInstaller.new
@@ -49,7 +49,7 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb#L49
 
   def test_available_set_for_name_prerelease
     util_setup_gems
-    p1a, gem = util_gem 'a', '10.a'
+    p1a, = util_gem 'a', '10.a'
     util_setup_spec_fetcher p1a, @a1, @a1_pre
 
     inst = Gem::DependencyInstaller.new :prerelease => true
@@ -62,7 +62,7 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb#L62
 
   def test_available_set_for_dep
     util_setup_gems
-    p1a, gem = util_gem 'a', '10.a'
+    p1a, = util_gem 'a', '10.a'
     util_setup_spec_fetcher p1a, @a1, @a1_pre
 
     inst = Gem::DependencyInstaller.new
@@ -76,7 +76,7 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_gem_dependency_installer.rb#L76
 
   def test_available_set_for_dep_prerelease
     util_setup_gems
-    p1a, gem = util_gem 'a', '10.a'
+    p1a, = util_gem 'a', '10.a'
     util_setup_spec_fetcher p1a, @a1, @a1_pre
 
     inst = Gem::DependencyInstaller.new :prerelease => true
Index: ruby_2_0_0/test/rubygems/test_gem_installer.rb
===================================================================
--- ruby_2_0_0/test/rubygems/test_gem_installer.rb	(revision 39794)
+++ ruby_2_0_0/test/rubygems/test_gem_installer.rb	(revision 39795)
@@ -1060,6 +1060,7 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_gem_installer.rb#L1060
   end
 
   def test_install_extension_flat
+    skip '1.8 mkmf.rb does not create TOUCH' if RUBY_VERSION < '1.9'
     @spec.require_paths = ["."]
 
     @spec.extensions << "extconf.rb"
@@ -1089,6 +1090,13 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_gem_installer.rb#L1090
       @installer.install
     end
     assert File.exist?(so)
+  rescue
+    puts '-' * 78
+    puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile')
+    puts '-' * 78
+    puts File.read File.join(@gemhome, 'gems', 'a-2', 'gem_make.out')
+    puts '-' * 78
+    raise
   end
 
   def test_installation_satisfies_dependency_eh

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r39597


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

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