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

ruby-changes:50522

From: nobu <ko1@a...>
Date: Mon, 5 Mar 2018 10:57:32 +0900 (JST)
Subject: [ruby-changes:50522] nobu:r62660 (trunk): required paths are real paths

nobu	2018-03-05 10:57:27 +0900 (Mon, 05 Mar 2018)

  New Revision: 62660

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62660

  Log:
    required paths are real paths
    
    Fix `test-spec` failures when the build directory is a symbolic
    link.

  Modified files:
    trunk/spec/ruby/core/method/source_location_spec.rb
    trunk/spec/ruby/core/proc/source_location_spec.rb
    trunk/spec/ruby/core/unboundmethod/source_location_spec.rb
Index: spec/ruby/core/proc/source_location_spec.rb
===================================================================
--- spec/ruby/core/proc/source_location_spec.rb	(revision 62659)
+++ spec/ruby/core/proc/source_location_spec.rb	(revision 62660)
@@ -19,19 +19,19 @@ describe "Proc#source_location" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/proc/source_location_spec.rb#L19
   it "sets the first value to the path of the file in which the proc was defined" do
     file = @proc.source_location.first
     file.should be_an_instance_of(String)
-    file.should == File.dirname(__FILE__) + '/fixtures/source_location.rb'
+    file.should == File.realpath('../fixtures/source_location.rb', __FILE__)
 
     file = @proc_new.source_location.first
     file.should be_an_instance_of(String)
-    file.should == File.dirname(__FILE__) + '/fixtures/source_location.rb'
+    file.should == File.realpath('../fixtures/source_location.rb', __FILE__)
 
     file = @lambda.source_location.first
     file.should be_an_instance_of(String)
-    file.should == File.dirname(__FILE__) + '/fixtures/source_location.rb'
+    file.should == File.realpath('../fixtures/source_location.rb', __FILE__)
 
     file = @method.source_location.first
     file.should be_an_instance_of(String)
-    file.should == File.dirname(__FILE__) + '/fixtures/source_location.rb'
+    file.should == File.realpath('../fixtures/source_location.rb', __FILE__)
   end
 
   it "sets the last value to a Fixnum representing the line on which the proc was defined" do
Index: spec/ruby/core/unboundmethod/source_location_spec.rb
===================================================================
--- spec/ruby/core/unboundmethod/source_location_spec.rb	(revision 62659)
+++ spec/ruby/core/unboundmethod/source_location_spec.rb	(revision 62660)
@@ -9,7 +9,7 @@ describe "UnboundMethod#source_location" https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/unboundmethod/source_location_spec.rb#L9
   it "sets the first value to the path of the file in which the method was defined" do
     file = @method.source_location.first
     file.should be_an_instance_of(String)
-    file.should == File.dirname(__FILE__) + '/fixtures/classes.rb'
+    file.should == File.realpath('../fixtures/classes.rb', __FILE__)
   end
 
   it "sets the last value to a Fixnum representing the line on which the method was defined" do
Index: spec/ruby/core/method/source_location_spec.rb
===================================================================
--- spec/ruby/core/method/source_location_spec.rb	(revision 62659)
+++ spec/ruby/core/method/source_location_spec.rb	(revision 62660)
@@ -13,7 +13,7 @@ describe "Method#source_location" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/method/source_location_spec.rb#L13
   it "sets the first value to the path of the file in which the method was defined" do
     file = @method.source_location.first
     file.should be_an_instance_of(String)
-    file.should == File.dirname(__FILE__) + '/fixtures/classes.rb'
+    file.should == File.realpath('../fixtures/classes.rb', __FILE__)
   end
 
   it "sets the last value to a Fixnum representing the line on which the method was defined" do

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

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