diff options
Diffstat (limited to 'railties/lib/rails/plugin.rb')
-rw-r--r-- | railties/lib/rails/plugin.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 80deb73bbb..dd840ef058 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -1,3 +1,6 @@ +require 'active_support/core_ext/kernel/reporting' +require 'active_support/dependencies' + module Rails # The Plugin class should be an object which provides the following methods: # @@ -35,10 +38,10 @@ module Rails def load_paths report_nonexistant_or_empty_plugin! unless valid? - returning [] do |load_paths| - load_paths << lib_path if has_lib_directory? - load_paths << app_paths if has_app_directory? - end.flatten + load_paths = [] + load_paths << lib_path if has_lib_directory? + load_paths << app_paths if has_app_directory? + load_paths.flatten end # Evaluates a plugin's init.rb file. |