Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/sinatra/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Sinatra
class Application < Base

# we assume that the first file that requires 'sinatra' is the
# app_file. all other path related options are calculated based
# We assume that the first file that requires 'sinatra' is the
# app_file. All other path related options are calculated based
# on this path by default.
set :app_file, caller_files.first || $0

Expand All @@ -22,9 +22,9 @@ class Application < Base
end
end

at_exit { Application.run! if $!.nil? && Application.run? }
at_exit { Application.run! if $ERROR_INFO.nil? && Application.run? }
end

# include would include the module in Object
# extend only extends the `main` object
# include would include the module in Object whereas
# extend only extends the `main` object.
extend Sinatra::Delegator