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

ruby-changes:27747

From: nagachika <ko1@a...>
Date: Mon, 18 Mar 2013 00:03:43 +0900 (JST)
Subject: [ruby-changes:27747] nagachika:r39799 (ruby_2_0_0): merge revision(s) 39608: [Backport #7749]

nagachika	2013-03-18 00:03:35 +0900 (Mon, 18 Mar 2013)

  New Revision: 39799

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

  Log:
    merge revision(s) 39608: [Backport #7749]
    
    * test/rubygems/test_require.rb:  Fix tests when 'a.rb' exists.
      [ruby-trunk - Bug #7749]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/test/rubygems/test_require.rb
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 39798)
+++ ruby_2_0_0/ChangeLog	(revision 39799)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Mon Mar 18 00:03:27 2013  Eric Hodel  <drbrain@s...>
+
+	* test/rubygems/test_require.rb:  Fix tests when 'a.rb' exists.
+	  [ruby-trunk - Bug #7749]
+
 Mon Mar 18 00:02:27 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems.rb:  Allow specification of directory permissions.
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 39798)
+++ ruby_2_0_0/version.h	(revision 39799)
@@ -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-18"
-#define RUBY_PATCHLEVEL 68
+#define RUBY_PATCHLEVEL 69
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_0_0/test/rubygems/test_require.rb
===================================================================
--- ruby_2_0_0/test/rubygems/test_require.rb	(revision 39798)
+++ ruby_2_0_0/test/rubygems/test_require.rb	(revision 39799)
@@ -2,19 +2,30 @@ require 'rubygems/test_case' https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_require.rb#L2
 require 'rubygems'
 
 class TestGemRequire < Gem::TestCase
+
+  def setup
+    super
+
+    assert_raises LoadError do
+      save_loaded_features do
+        require 'test_gem_require_a'
+      end
+    end
+  end
+
   def assert_require(path)
     assert require(path), "'#{path}' was already required"
   end
 
   def test_require_is_not_lazy_with_exact_req
-    a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/a.rb"
+    a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/test_gem_require_a.rb"
     b1 = new_spec "b", "1", nil, "lib/b/c.rb"
     b2 = new_spec "b", "2", nil, "lib/b/c.rb"
 
     install_specs a1, b1, b2
 
     save_loaded_features do
-      assert_require 'a'
+      assert_require 'test_gem_require_a'
       assert_equal %w(a-1 b-1), loaded_spec_names
       assert_equal unresolved_names, []
 
@@ -24,14 +35,14 @@ class TestGemRequire < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_require.rb#L35
   end
 
   def test_require_is_lazy_with_inexact_req
-    a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/a.rb"
+    a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/test_gem_require_a.rb"
     b1 = new_spec "b", "1", nil, "lib/b/c.rb"
     b2 = new_spec "b", "2", nil, "lib/b/c.rb"
 
     install_specs a1, b1, b2
 
     save_loaded_features do
-      assert_require 'a'
+      assert_require 'test_gem_require_a'
       assert_equal %w(a-1), loaded_spec_names
       assert_equal unresolved_names, ["b (>= 1)"]
 
@@ -41,13 +52,13 @@ class TestGemRequire < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_require.rb#L52
   end
 
   def test_require_is_not_lazy_with_one_possible
-    a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/a.rb"
+    a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/test_gem_require_a.rb"
     b1 = new_spec "b", "1", nil, "lib/b/c.rb"
 
     install_specs a1, b1
 
     save_loaded_features do
-      assert_require 'a'
+      assert_require 'test_gem_require_a'
       assert_equal %w(a-1 b-1), loaded_spec_names
       assert_equal unresolved_names, []
 
@@ -59,13 +70,13 @@ class TestGemRequire < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/rubygems/test_require.rb#L70
   def test_activate_via_require_respects_loaded_files
     require 'benchmark' # stdlib
     save_loaded_features do
-      a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/a.rb"
+      a1 = new_spec "a", "1", {"b" => ">= 1"}, "lib/test_gem_require_a.rb"
       b1 = new_spec "b", "1", nil, "lib/benchmark.rb"
       b2 = new_spec "b", "2", nil, "lib/benchmark.rb"
 
       install_specs a1, b1, b2
 
-      require 'a'
+      require 'test_gem_require_a'
       assert_equal unresolved_names, ["b (>= 1)"]
 
       refute require('benchmark'), "benchmark should have already been loaded"

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


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

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