From d25a82280f977664e3b3d49c13bb68502718f6e2 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 12 Mar 2013 10:09:03 -0300 Subject: Stop calling "super" twice in Rails::Server#app Cache the value of "super" in a variable and use it instead. --- railties/lib/rails/commands/server.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails') 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 -- cgit v1.2.3