ruby-changes:52539
From: nobu <ko1@a...>
Date: Sat, 15 Sep 2018 20:45:37 +0900 (JST)
Subject: [ruby-changes:52539] nobu:r64751 (trunk): get rid of newer syntax for old versions
nobu 2018-09-15 20:45:31 +0900 (Sat, 15 Sep 2018) New Revision: 64751 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64751 Log: get rid of newer syntax for old versions 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 64750) +++ spec/mspec/lib/mspec/utils/script.rb (revision 64751) @@ -189,10 +189,11 @@ class MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/utils/script.rb#L189 end patterns.each do |pattern| - expanded = File.realpath(pattern) - rescue Errno::ENOENT - next - else + begin + expanded = File.realpath(pattern) + rescue Errno::ENOENT + next + end 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/