public
Fork of wycats/merb-core
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/auser/merb-core.git
Merb::BootLoader::LoadClasses should keep unique list of classes

When tracking classes that haven't succesfully loaded yet, make sure to 
keep
an unique list. Otherwise the break condition could fail to execute.
fabien (author)
Mon Mar 17 13:31:05 -0700 2008
commit  bcc5121cedaee28b519ccb01accc08f59c3ef236
tree    d0079e7cd9f340c48ee0c757846cfb6bebe56a80
parent  589c989a4d322575b0dce86ec42000fc4e8d7c60
...
226
227
228
229
 
230
231
232
...
334
335
336
337
 
 
338
339
340
...
226
227
228
 
229
230
231
232
...
334
335
336
 
337
338
339
340
341
0
@@ -226,7 +226,7 @@ class Merb::BootLoader::Dependencies < Merb::BootLoader
0
     if Merb.environment && File.exist?(env_config = (Merb.dir_for(:config) / "environments" / (Merb.environment + ".rb")))
0
       load env_config
0
     end
0
-
0
+
0
     enable_json_gem unless Merb::disabled?(:json)
0
     load_dependencies
0
     update_logger
0
@@ -334,7 +334,8 @@ class Merb::BootLoader::LoadClasses < Merb::BootLoader
0
           end
0
         end
0
         
0
- klasses.concat(failed_classes)
0
+ # keep list of classes unique
0
+ failed_classes.each { |k| klasses.push(k) unless klasses.include?(k) }
0
         
0
         #stop processing if nothing loads or if everything has loaded
0
         break if(klasses.size == size_at_start || klasses.size == 0)

Comments

    No one has commented yet.