diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-26 12:14:48 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-26 12:16:47 +0100 |
commit | db99324a89a2a681c6f6b0957dac7a309bfca574 (patch) | |
tree | 27884c07d6ba447fc26b61fd250cc8b6110d467f /railties/lib | |
parent | c5b652f3d25ef92ae0f67551464fb03bda6aeb4f (diff) | |
download | rails-db99324a89a2a681c6f6b0957dac7a309bfca574.tar.gz rails-db99324a89a2a681c6f6b0957dac7a309bfca574.tar.bz2 rails-db99324a89a2a681c6f6b0957dac7a309bfca574.zip |
Ensure calling a method in Rails::Application does not instantiate a void application.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index b7e5eb7a1d..eba49e1520 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -16,10 +16,10 @@ module Rails alias :configure :class_eval def instance - if instance_of?(Rails::Application) - Rails.application.instance + if self == Rails::Application + Rails.application else - @instance ||= new + @@instance ||= new end end |