[macruby-changes] [1324] MacRuby/branches/experimental/mspec/lib/mspec/utils/script.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sat Apr 4 04:56:40 PDT 2009
Revision: 1324
http://trac.macosforge.org/projects/ruby/changeset/1324
Author: eloy.de.enige at gmail.com
Date: 2009-04-04 04:56:38 -0700 (Sat, 04 Apr 2009)
Log Message:
-----------
Removed another MacRuby return-from-block workaround from mspec.
Modified Paths:
--------------
MacRuby/branches/experimental/mspec/lib/mspec/utils/script.rb
Modified: MacRuby/branches/experimental/mspec/lib/mspec/utils/script.rb
===================================================================
--- MacRuby/branches/experimental/mspec/lib/mspec/utils/script.rb 2009-04-04 06:27:05 UTC (rev 1323)
+++ MacRuby/branches/experimental/mspec/lib/mspec/utils/script.rb 2009-04-04 11:56:38 UTC (rev 1324)
@@ -169,32 +169,16 @@
patterns << File.join(config[:prefix], file)
end
- # patterns.each do |pattern|
- # expanded = File.expand_path(pattern)
- # return [pattern] if File.file?(expanded)
- #
- # specs = File.join(pattern, "/**/*_spec.rb")
- # specs = File.expand_path(specs) rescue specs
- # return Dir[specs].sort if File.directory?(expanded)
- # end
- #
- # Dir[partial]
-
- # MR Hack: workaround return from block problem.
- res = nil
patterns.each do |pattern|
expanded = File.expand_path(pattern)
- if File.file?(expanded)
- res = [pattern]
- elsif File.directory?(expanded)
- specs = File.join(pattern, "/**/*_spec.rb")
- specs = File.expand_path(specs) rescue specs
- res = Dir[specs].sort
- end
- break if res
+ return [pattern] if File.file?(expanded)
+
+ specs = File.join(pattern, "/**/*_spec.rb")
+ specs = File.expand_path(specs) rescue specs
+ return Dir[specs].sort if File.directory?(expanded)
end
- res || Dir[partial]
+ Dir[partial]
end
# Resolves each entry in +list+ to a set of files.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090404/7094e9db/attachment.html>
More information about the macruby-changes
mailing list