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

ruby-changes:52537

From: nobu <ko1@a...>
Date: Sat, 15 Sep 2018 18:48:49 +0900 (JST)
Subject: [ruby-changes:52537] nobu:r64749 (trunk): Expand spec files to realpaths

nobu	2018-09-15 18:48:42 +0900 (Sat, 15 Sep 2018)

  New Revision: 64749

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

  Log:
    Expand spec files to realpaths
    
    * spec/mspec/lib/mspec/utils/script.rb (MSpecScript#entries): expand
      the given spec path to the realpath, not to require a library by
      realpath and symbolic link path from the spec file.

  Modified files:
    trunk/spec/mspec/lib/mspec/utils/script.rb
Index: spec/mspec/lib/mspec/utils/script.rb
===================================================================
--- spec/mspec/lib/mspec/utils/script.rb	(revision 64748)
+++ spec/mspec/lib/mspec/utils/script.rb	(revision 64749)
@@ -189,7 +189,10 @@ class MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/utils/script.rb#L189
     end
 
     patterns.each do |pattern|
-      expanded = File.expand_path(pattern)
+      expanded = File.realpath(pattern)
+    rescue Errno::ENOENT
+      next
+    else
       if File.file?(expanded) && expanded.end_with?('.rb')
         return [expanded]
       elsif File.directory?(expanded)

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

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