Permalink
Browse files

Show lazy middleware args in pretty print

  • Loading branch information...
1 parent 11af089 commit e0660192806fc1ec8b75654e69211f85c9f1256b @josh josh committed May 3, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 actionpack/lib/action_dispatch/middleware/stack.rb
View
3 actionpack/lib/action_dispatch/middleware/stack.rb
@@ -61,7 +61,7 @@ def ==(middleware)
def inspect
str = klass.to_s
- args.each { |arg| str += ", #{arg.inspect}" }
+ args.each { |arg| str += ", #{build_args.inspect}" }
str
end
@@ -74,7 +74,6 @@ def build(app)
end
private
-
def build_args
Array(args).map { |arg| arg.respond_to?(:call) ? arg.call : arg }
end

0 comments on commit e066019

Please sign in to comment.