Changeset 5782
- Timestamp:
- 12/24/06 14:53:35 (2 years ago)
- Files:
-
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/dependencies.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r5728 r5782 1 1 *SVN* 2 3 * Update load once paths to prevent nested once constants from being detected and claimed by an external non-once load. [Nicholas Seckar] 2 4 3 5 * Deprecation: silence warnings when reporting test errors. [Jeremy Kemper] trunk/activesupport/lib/active_support/dependencies.rb
r5710 r5782 131 131 # paths which would cause Dependencies to attempt to load this file. 132 132 # 133 def loadable_constants_for_path(path, bases = load_paths - load_once_paths)133 def loadable_constants_for_path(path, bases = load_paths) 134 134 path = $1 if path =~ /\A(.*)\.rb\Z/ 135 135 expanded_path = File.expand_path(path) … … 170 170 end 171 171 172 def load_once_path?(path) 173 load_once_paths.any? { |base| path.starts_with? base } 174 end 175 172 176 # Attempt to autoload the provided module name by searching for a directory 173 177 # matching the expect path suffix. If found, the module is created and assigned … … 201 205 end 202 206 203 autoloaded_constants.concat newly_defined_paths 207 autoloaded_constants.concat newly_defined_paths unless load_once_path?(path) 204 208 autoloaded_constants.uniq! 205 209 log "loading #{path} defined #{newly_defined_paths * ', '}" unless newly_defined_paths.empty?