diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-15 22:32:34 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-15 22:32:34 +0000 |
commit | 1b023030a88a35118875b068a1fd725c58a32083 (patch) | |
tree | 07bbdc25e71d98bfa4091f617d82fc87541364c5 /lib/rake/file_list.rb | |
parent | e9c28d0fce1fa34bd83e910273981190932ebf63 (diff) | |
download | ruby-1b023030a88a35118875b068a1fd725c58a32083.tar.gz |
* lib/rake*: Updated to rake 0.9.4
http://rake.rubyforge.org/doc/release_notes/rake-0_9_4_rdoc.html for
a list of changes in 0.9.4.
* test/rake*: ditto
* NEWS: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake/file_list.rb')
-rw-r--r-- | lib/rake/file_list.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index b74ecac4cc..b9b9d7216a 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -340,7 +340,7 @@ module Rake # Add matching glob patterns. def add_matching(pattern) - Rake.glob(pattern).each do |fn| + FileList.glob(pattern).each do |fn| self << fn unless exclude?(fn) end end @@ -383,6 +383,13 @@ module Rake def [](*args) new(*args) end + + # Get a sorted list of files matching the pattern. This method + # should be prefered to Dir[pattern] and Dir.glob[pattern] because + # the files returned are guaranteed to be sorted. + def glob(pattern, *args) + Dir.glob(pattern, *args).sort + end end end end |