public
Rubygem
Description: (offically at github.com/sinatra/sinatra) Classy web-development dressed in a DSL
Homepage: http://sinatra.github.com
Clone URL: git://github.com/bmizerany/sinatra.git
Kernel.load $0 breaks when $0 is not the file with sinatra routes, add an 
:app_file option to define which file to reload
cschneid (author)
Sun May 18 10:18:42 -0700 2008
commit  174d9c8a25b80eef9b92dd4054579ed5788e81e1
tree    eff1649540cee477ebd44f22e692f24f85660efe
parent  3588b55bc17f1e8ab359241aa5a532dd25cc869b
0
lib/sinatra.rb 100644 →
...
848
849
850
851
 
 
852
853
854
...
932
933
934
935
 
936
937
938
...
848
849
850
 
851
852
853
854
855
...
933
934
935
 
936
937
938
939
0
@@ -848,7 +848,8 @@ module Sinatra
0
         :views => root + '/views',
0
         :public => root + '/public',
0
         :sessions => false,
0
-        :logging => true
0
+        :logging => true,
0
+        :app_file => $0
0
       }
0
     end
0
     
0
@@ -932,7 +933,7 @@ module Sinatra
0
       @reloading = true
0
       clearables.each(&:clear)
0
       load_default_events!
0
-      Kernel.load $0
0
+      Kernel.load Sinatra.options.app_file
0
       @reloading = false
0
       Environment.setup!
0
     end

Comments