Skip to content

Commit

Permalink
Fix issue with passed routes and provides
Browse files Browse the repository at this point in the history
  • Loading branch information
mwpastore committed Feb 12, 2016
1 parent fdd17eb commit 75ab338
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/sinatra/base.rb
Expand Up @@ -970,8 +970,12 @@ def route!(base = settings, pass_block = nil)
route_eval { block[*args] }
end

# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
if returned_pass_block
# don't wipe out pass_block in superclass
pass_block = returned_pass_block
# prevent passed route from pinning the content type
response['Content-Type'] = nil
end
end
end

Expand Down

0 comments on commit 75ab338

Please sign in to comment.