aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/core_ext/class/delegating_attributes.rb2
-rw-r--r--railties/lib/rails/paths.rb35
2 files changed, 4 insertions, 33 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
index 29bf7c0f3d..0634f20e3c 100644
--- a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
@@ -1,5 +1,3 @@
-require 'active_support/core_ext/object/blank'
-require 'active_support/core_ext/array/extract_options'
require 'active_support/core_ext/kernel/singleton_class'
require 'active_support/core_ext/module/remove_method'
diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb
index f849d8bfc3..d9c47c0498 100644
--- a/railties/lib/rails/paths.rb
+++ b/railties/lib/rails/paths.rb
@@ -155,26 +155,10 @@ module Rails
each do |p|
path = File.expand_path(p, @root.path)
- if @glob
- if File.directory? path
- result.concat expand_dir(path, @glob)
- else
- # FIXME: I think we can remove this branch, but I'm not sure.
- # Say the filesystem has this file:
- #
- # /tmp/foobar
- #
- # and someone adds this path:
- #
- # /tmp/foo
- #
- # with a glob of "*", then this function will return
- #
- # /tmp/foobar
- #
- # We need to figure out if that is desired behavior.
- result.concat expand_file(path, @glob)
- end
+ if @glob && File.directory?(path)
+ result.concat Dir.chdir(path) {
+ Dir.glob(@glob).map { |file| File.join path, file }.sort
+ }
else
result << path
end
@@ -194,17 +178,6 @@ module Rails
end
alias to_a expanded
-
- private
- def expand_file(path, glob)
- Dir[File.join(path, glob)].sort
- end
-
- def expand_dir(path, glob)
- Dir.chdir(path) do
- Dir.glob(glob).map { |file| File.join path, file }.sort
- end
- end
end
end
end