aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-08-24 13:25:11 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-08-24 13:25:11 -0700
commit44f07098fe415593e7721afe89e40581d7dc35d3 (patch)
treef93561658bf5af1fa3f2c32f3ff9ff052fc2e33e /railties
parent2f88743c30ef3dcc7616a6cf18331b84372172b8 (diff)
downloadrails-44f07098fe415593e7721afe89e40581d7dc35d3.tar.gz
rails-44f07098fe415593e7721afe89e40581d7dc35d3.tar.bz2
rails-44f07098fe415593e7721afe89e40581d7dc35d3.zip
dealing with some -w warnings on startup
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/application.rb5
-rw-r--r--railties/lib/rails/application/bootstrap.rb2
-rw-r--r--railties/lib/rails/engine.rb1
-rw-r--r--railties/lib/rails/plugin.rb3
4 files changed, 9 insertions, 2 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index fb60ddd9b5..528c96ef3e 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -55,6 +55,11 @@ module Rails
delegate :default_url_options, :default_url_options=, :to => :routes
+ def initialize
+ super
+ @initialized = false
+ end
+
# This method is called just after an application inherits from Rails::Application,
# allowing the developer to load classes in lib and use them during application
# configuration.
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb
index 9f21d273e6..c9b147d075 100644
--- a/railties/lib/rails/application/bootstrap.rb
+++ b/railties/lib/rails/application/bootstrap.rb
@@ -28,7 +28,7 @@ module Rails
logger.level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase)
logger.auto_flushing = false if Rails.env.production?
logger
- rescue StandardError => e
+ rescue StandardError
logger = ActiveSupport::BufferedLogger.new(STDERR)
logger.level = ActiveSupport::BufferedLogger::WARN
logger.warn(
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 2c3f61f404..89b151beb6 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -360,6 +360,7 @@ module Rails
end
def endpoint(endpoint = nil)
+ @endpoint ||= nil
@endpoint = endpoint if endpoint
@endpoint
end
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb
index ceddd25eaa..4988cc3378 100644
--- a/railties/lib/rails/plugin.rb
+++ b/railties/lib/rails/plugin.rb
@@ -74,7 +74,8 @@ module Rails
initializer :load_init_rb, :before => :load_config_initializers do |app|
init_rb = File.expand_path("init.rb", root)
if File.file?(init_rb)
- config = app.config
+ # FIXME: do we call this for side effects??
+ app.config
# TODO: think about evaling initrb in context of Engine (currently it's
# always evaled in context of Rails::Application)
eval(File.read(init_rb), binding, init_rb)