lib/rake/rake_module.rb in rake-0.9.3.beta.1 vs lib/rake/rake_module.rb in rake-0.9.3.beta.2
- old
+ new
@@ -22,8 +22,15 @@
# Load a rakefile.
def load_rakefile(path)
load(path)
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