Skip to content

Commit

Permalink
dealing with some -w warnings on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Aug 24, 2011
1 parent 64c1d8a commit c29426d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions activesupport/lib/active_support/i18n_railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def self.reloader

protected

@i18n_inited = false

# Setup i18n configuration
def self.initialize_i18n(app)
return if @i18n_inited
Expand Down
5 changes: 5 additions & 0 deletions railties/lib/rails/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ def inherited(base)

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.
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/application/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Bootstrap
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(
Expand Down
1 change: 1 addition & 0 deletions railties/lib/rails/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def inherited(base)
end

def endpoint(endpoint = nil)
@endpoint ||= nil
@endpoint = endpoint if endpoint
@endpoint
end
Expand Down
3 changes: 2 additions & 1 deletion railties/lib/rails/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def config
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)
Expand Down

0 comments on commit c29426d

Please sign in to comment.