aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-03-12 10:09:03 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-03-12 10:10:18 -0300
commitd25a82280f977664e3b3d49c13bb68502718f6e2 (patch)
tree3284dcbdc7fd5f228538cfbac488041d435bb30d /railties/lib
parent6e07658fcf4a3ffc815b2de18d594a62666f5e62 (diff)
downloadrails-d25a82280f977664e3b3d49c13bb68502718f6e2.tar.gz
rails-d25a82280f977664e3b3d49c13bb68502718f6e2.tar.bz2
rails-d25a82280f977664e3b3d49c13bb68502718f6e2.zip
Stop calling "super" twice in Rails::Server#app
Cache the value of "super" in a variable and use it instead.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/commands/server.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb
index cdb29a8156..ddf45d196a 100644
--- a/railties/lib/rails/commands/server.rb
+++ b/railties/lib/rails/commands/server.rb
@@ -43,7 +43,10 @@ module Rails
end
def app
- @app ||= super.respond_to?(:to_app) ? super.to_app : super
+ @app ||= begin
+ app = super
+ app.respond_to?(:to_app) ? app.to_app : app
+ end
end
def opt_parser