Fixes problem in development where reloading overrides custom errors
This commit is contained in:
parent
08b1452a37
commit
ce673fa4d9
|
@ -1110,10 +1110,10 @@ module Sinatra
|
||||||
# and then reload the application source file. This occurs
|
# and then reload the application source file. This occurs
|
||||||
# automatically before each request is processed in development.
|
# automatically before each request is processed in development.
|
||||||
def reload!
|
def reload!
|
||||||
@reloading = true
|
|
||||||
@pipeline = nil
|
|
||||||
clearables.each(&:clear)
|
clearables.each(&:clear)
|
||||||
load_default_configuration!
|
load_default_configuration!
|
||||||
|
@pipeline = nil
|
||||||
|
@reloading = true
|
||||||
Kernel.load $0
|
Kernel.load $0
|
||||||
@reloading = false
|
@reloading = false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue