public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Prepare for Rails 2.2: do not preload application source files when Rails 
>= 2.2, because Rails already does that for us.
Hongli Lai (Phusion) (author)
Sat Jul 19 14:37:35 -0700 2008
commit  9fd384934ef711f5fdfe5708033f507587e26529
tree    98bd2acd23973a2d721bac5b23e5c71ecc8f98e0
parent  83bf7d077080f5129de87c3031305f74058db3b1
...
262
263
264
265
 
 
 
 
 
 
266
267
268
...
262
263
264
 
265
266
267
268
269
270
271
272
273
0
@@ -262,7 +262,12 @@ private
0
       require 'dispatcher'
0
     end
0
     require_dependency 'application'
0
- if GC.copy_on_write_friendly?
0
+
0
+ # - No point in preloading the application sources if the garbage collector
0
+ # isn't copy-on-write friendly.
0
+ # - Rails >= 2.2 already preloads application sources by default, so no need
0
+ # to do that again.
0
+ if GC.copy_on_write_friendly? && !::Rails::Initializer.respond_to?(:load_application_classes)
0
       Dir.glob('app/{models,controllers,helpers}/*.rb').each do |file|
0
         require_dependency normalize_path(file)
0
       end

Comments

    No one has commented yet.