aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-04-22 16:10:49 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-04-22 16:10:49 -0700
commitab321268f86d9013cbd4ecd0b5f46e7b05ec55a9 (patch)
tree94080b82630ad3312e9f29b8ce687f1d6272af34 /railties/lib/rails
parent42a06d2d6253eed3b9f4fb4edfa251c9508a2e20 (diff)
downloadrails-ab321268f86d9013cbd4ecd0b5f46e7b05ec55a9.tar.gz
rails-ab321268f86d9013cbd4ecd0b5f46e7b05ec55a9.tar.bz2
rails-ab321268f86d9013cbd4ecd0b5f46e7b05ec55a9.zip
No more free lunch
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/plugin.rb10
-rw-r--r--railties/lib/rails/rack/metal.rb1
2 files changed, 7 insertions, 4 deletions
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb
index 80deb73bbb..e66166306a 100644
--- a/railties/lib/rails/plugin.rb
+++ b/railties/lib/rails/plugin.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/kernel/reporting'
+
module Rails
# The Plugin class should be an object which provides the following methods:
#
@@ -35,10 +37,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.
diff --git a/railties/lib/rails/rack/metal.rb b/railties/lib/rails/rack/metal.rb
index adc43da864..7a616c7911 100644
--- a/railties/lib/rails/rack/metal.rb
+++ b/railties/lib/rails/rack/metal.rb
@@ -1,4 +1,5 @@
require 'active_support/ordered_hash'
+require 'active_support/core_ext/class/attribute_accessors'
module Rails
module Rack